-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc cleanup 2 #411
Doc cleanup 2 #411
Conversation
Remaining issues that I would like Philipp or Jean-Luc to address:
|
Thanks for going through this, looks like you put a lot of work into it. Should be able to review tomorrow evening. |
The Composing Data tutorial will probably break the tests also, because I added an example showing that floating-point access to the underlying data does work, unlike what the tutorial previously claimed. Just one cell, with text output, but it's probably still just as broken. It would be very helpful if someone could look at anything that says "deep indexing" to see if I'm describing it accurately -- I thought we used that term to describe accessing all the way into .data, while the existing use of that term in this file was about accessing across multiple Containers using .select. Are they both deep indexing? If so, maybe we could clarify that; if not, maybe we could make a new name for indexing into an Element. It would also be helpful if someone could check everything I said in the section where we look up the value at 5.2; I wasn't able to find an example of doing that that didn't work, but the previous text claimed there are some, so it would be good to be precise here about which Elements will and will not work for approximate floating-point index values. |
Indexing into an Element to get a numeric value is usually not what we call
Still traveling atm so I can't look in detail but I'll list the conditions where you won't get a single value.
|
Ok, I can remove the claim that indexing into .data is deep indexing; is there a name we should use for that instead? For your other answer, I think you're answering a different question than the one I have. What I meant is that using [5.2] to get element 52 of the array in that example works fine, but using [5.2005] also works and gives the same result, as does [5.23]. I.e., the index does not need to be the precise floating point value of the key, as the tutorial previously claimed, because the indexing will just return the closest value that is defined. So, when will this work? I put in some words saying when I thought such approximate indexing would work, but please check that those words are correct and change them if necessary. |
Ah right. That will work for all 1D (i.e. one kdim) elements. |
But not for Image and Surface, even though it's well defined in that case? |
Ah sorry for those too, I think Image, Surface and QuadMesh are the only 2d types where it will snap. |
The Bokeh tutorial will also probably force test data to be regenerated, as I made some small but (to my mind :-) important changes. |
The Bokeh_Elements tutorial says:
Is this true even for bokeh? It does ok with the ones in the example, but is there a more definitive marker list for bokeh? I added the sentence |
Pandas_Conversion currently includes a bunch of material that is now in the Columnar_Data tutorial, and the rest is generating warnings. I left everything untouched after "Conversion to complex HoloViews components", because it's clearly a duplication, and on the rest I just did a light-touch editing job in case that text is still useful. @philippjfr will need to look at what remains, deleting the duplication and reworking the remainder, or just deleting the whole tutorial if no longer relevant. Some of it does seem relevant, since it explains a bit about how the Pandas interaction works, or I would have just deleted it myself. |
The Pandas_Seaborn tutorial needs similar attention as the Pandas Conversion tutorial, i.e. to avoid deprecation warnings and make it focus on what we currently recommend that users do, if not DFrame. Also, Out[3] had an exception both when I run it and on the public website, which is replaced with a warning when removing the "label=" options, so I left it as-is for someone else to correct. In[6] also has an error if the "[joint=True]" option is specified, which again needs addressing. |
Bokeh tutorials are currently untested as we somehow have to sanitize the json to ignore various ids.
By default bokeh supports none of the short marker identifiers but I did implement a mpl -> bokeh compatibility function, which among other things translates mpl markers to their bokeh equivalent. We'll have to decide whether to keep this or not.
I'll have to look into bokeh support for polar projections, if so could you point me to the examples?
I'll have a look at what can be saved and move it into other Tutorials as it's probably not worth it keeping this Tutorial around. |
Yes, this seems to reveal two bugs, first I didn't account for snapping in 1D in sample, secondly this shouldn't work at all because 2D Points shouldn't be snapping even when only a 1D index is supplied. This example should be using Scatter instead. |
I think that the helper function to translate markers to bokeh seems useful, so I'd keep it unless it's an egregious hack (which it doesn't sound like). The polar histogram example plot I saw in bokeh was at http://bokeh.pydata.org/en/latest/docs/gallery/burtin.html, but looking more closely at it, I don't see any usable polar-histogram implementation there; it's just a very low-level example of drawing wedges in a circle. So if someone needs polar histograms using the bokeh backend, we'd have to submit something to bokeh to implement them properly first. What's the long-term plan for the Elements Tutorial, wrt backends? I've already made various edits to the matplotlib version that should presumably be mirrored into the Bokeh version, plus the Bokeh version has a few changes relative to the matplotlib version (plus apparently some missing Elements). Should we set up some automatic mechanism for generating a version specific to each backend, by applying patches to one master version? Presumably the master version would be easiest to maintain if it's an actual runnable notebook, i.e. the matplotlib version, perhaps with some markdown sections for code only for other versions, which would then be enabled during patching? |
BTW, is this statement from Elements really true?
Seems like a Scatter could easily be plotting two or three value dimensions, e.g. if someone measured the elevation and size of something distributed at regular intervals along a horizontal length, leading to a Scatter plot with height on y and size as dot size. |
Is it still true that this is undocumented?
Is that still true? If not please update. E.g. what else can they be internally? Also, I added an example of a non-gridded VectorField, as requested by someone (can't find this issue anymore!), which of course will break the tests for Elements. Feel free to improve that example, e.g. to make it more colorful or to show lines instead of arrows. |
Should index.rst be updated to say we support Python 3.5 now? If so we need a 3.5 test on Travis. Then again, it says we support Python 3.3, and there's only a 3.4 test on Travis, so I don't know how we can know if 3.3 support is true... |
Since we want the documentation to be updated asap, I'll be updating the reference_data now and merge this PR. Any further fixes can be made in future PRs. |
ce4f2c1
to
becd1dc
Compare
Great, thanks! We need to make sure to visually check the generated output for the files whose reference data changed, to make sure we don't miss some subtle change in behavior. |
I've gone through all the reference_data and it all looks fine so I've updated it and will merge now. I'll reopen this PR shortly and go through your other suggestions. Buildbot will push the updated website to dev.holoviews.org in a few minutes and I'll update the main website to match. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Ok, there are more doc cleanups ready to merge, after review. These are more extensive than the previous ones, and affect the test data, because cells have been reorganized, changed, deleted, and moved between tutorials. So the best way to review these changes is probably just to look at the affected notebooks (mainly Sampling Data and Columnar Data), see if they need changes locally, then roughly compare to the previous versions of those notebooks. Note that I moved the .table and .dframe section from Sampling Data into Columnar Data, where it seems to fit naturally, so that bit has to be compared between different tutorials. Or you can just look at the final result, and not worry about the previous version; up to you!