doc: refresh writing_NXdata page and add scatter 3d examples to it#4541
Conversation
| ds = nxdata.create_dataset("x", | ||
| data=numpy.array([101.1, 101.2, 101.3, 101.4])) | ||
| ds.attrs["long_name"] = numpy.array("abscissa", dtype=text_dtype) | ||
|
|
There was a problem hiding this comment.
I feel like something is missing here after the example: either a description of the produced plot or a screenshot of silx view
What do you think?
There was a problem hiding this comment.
The corresponding screenshots would be awesome!
Maybe before the code snippet.
There was a problem hiding this comment.
It seemed more natural to me to put it after to show the result. Tell me what you think
There was a problem hiding this comment.
I was think of a gallery: find the plot you want and then look at how to do it, but it is fine as it is for me!
There was a problem hiding this comment.
Ah yes, it could be nice.
Well, one can navigate to the appropriate plot using the sidebar menu since every plot has its own section
|
|
||
| import numpy | ||
| from silx.io.nxdata import save_NXdata | ||
| When producing the 3D scatter plot, ``silx view`` will scale the markers according to the first auxiliary signal. |
t20100
left a comment
There was a problem hiding this comment.
Nice to remove duplicated examples and making each sample code independent.
Adding some screenshots would be awesome!
I did not remove the introductory part about NeXus for now but I think we could trim it down or tie it with the examples.
+1 to strim it down in another PR and refer to nexus documentation and the keep silx specifics which would become more visible.
| ds = nxdata.create_dataset("x", | ||
| data=numpy.array([101.1, 101.2, 101.3, 101.4])) | ||
| ds.attrs["long_name"] = numpy.array("abscissa", dtype=text_dtype) | ||
|
|
There was a problem hiding this comment.
The corresponding screenshots would be awesome!
Maybe before the code snippet.
|
So, here are the improvements in this PR after review:
|
|
For next PRs:
Did I miss something @t20100 ? |
| ds = nxdata.create_dataset("x", | ||
| data=numpy.array([101.1, 101.2, 101.3, 101.4])) | ||
| ds.attrs["long_name"] = numpy.array("abscissa", dtype=text_dtype) | ||
|
|
There was a problem hiding this comment.
I was think of a gallery: find the plot you want and then look at how to do it, but it is fine as it is for me!
| If the image axes have the same ``units`` or both have no ``units``, the image aspect ratio will kept. | ||
|
|
||
| In the example above, the two axes ``x`` and ``y`` have different ``units`` so that the image aspect ratio is not conserved. No newline at end of file |
<Module or Topic>: <Action> <Summary>(see contributing guidelines)numpy.array(..., dtype=text_dtype))Writing NXdata with silxto make way for more convenient helpers as discussed with @t20100I did not remove the introductory part about NeXus for now but I think we could trim it down or tie it with the examples.