-
Notifications
You must be signed in to change notification settings - Fork 8
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
Functionality to display lower and upper limits of observational data #108
Conversation
It seems to me that matplotlib requires an yerr value to be passed to plot lower/upper limits correctly. For example the following code only adds limits for one of the two lines
I think we need to handle the case where someone wants to indicate lower/upper limits, but doesn't pass scatter values when they create the ObservationalData object. Maybe we default to yerr with a constant size in that case? I would probably be in favour of using a constant yerr size even if y_scatter is passed. |
…dicate upper and lower limits
Thanks for the feedback @robjmcgibbon. I agree with your comments! The updated version always uses the default arrow sizes, regardless of what scatter values are passed to the Please let me know if the new version works for you. |
I have pushed an update ensuring that the default scatter values are used to indicate lower/upper limits only if the user does not provide y scatter. |
This PR adds a new functionality that enables the user to indicate lower and/or upper limits of observational data.
To specify lower/upper limits, the user will need to pass one or two bool arrays to the
associate_y()
method in the conversion script that converts the data from raw to hdf5 format.Once the raw data have been processed and saved as an hdf5 file, no further changes are required. That is: everything else in the pipeline remains the same.
For example,
I can modify
data/GalaxyHIMassFunction/convertJones2018.py
conversion script asthen I can use the standard methods to load and plot the processed data as
The resulting figure is
Note that if an observational dataset is shown as 'line' as opposed to 'scatter', then lower/upper limits will still be displayed. E.g.