-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Dataset plot line #4235
Comments
To be sure - you want to get the x-values from one DataArray and the y-values from another? Similarly to http://xarray.pydata.org/en/stable/plotting.html#datasets but drawing lines instead of scatterpoints? Sounds reasonable but may be a bit more difficult than xarray/xarray/plot/dataset_plot.py Lines 435 to 437 in 1be777f
|
Sounds good. Just to mention that it might be easy to implement by stacking the arrays using |
To give a bit more context, an example code simulating an experimental measurement.
I wish to be able to use this
However, the closest I could get is with only
|
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
Is your feature request related to a problem? Please describe.
Dataset
have one plotting methodDataset.plot.scatter
. This usesmatplotlb
'sax.scatter
which have a limited presentation configuration (eg linestyle and marker).I have 2D X and Y data which I like to plot against each other. The
DataArray.plot.line
works well if I only use a 1D X data.Describe the solution you'd like
A new plotting method
Dataset.plot.line
based onmatplotlib
'sax.plot
which will allow me to plot 2D X and Y against each other with flexible presentation configuration. In other to be able to produce 1D lines, this must demand a required 3D dimension as an argument (eg a choice ofhue
,col
or others).I suspect that as increase in number of dimensions from 1D to 2D for both variables and later to ND, there will be many ways to interpret the arguments given to the plotting function,. However, the fact the method name is
line
in indicate that it must produce 1D lines, and use other dimensions to create other features such as legend or subplots.Having seen the code for the
Dataset.plot.scatter
I am keen to submit a PR to addDataset.plot.line
.The text was updated successfully, but these errors were encountered: