Skip to content

xyplot: support asymmetric errors #339

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

Merged
merged 2 commits into from
Mar 20, 2017
Merged

xyplot: support asymmetric errors #339

merged 2 commits into from
Mar 20, 2017

Conversation

tgoldina
Copy link
Contributor

https://jira.lsstcorp.org/browse/DM-8685

To test:

  1. WISE catalog search (ex. m31, 100 arcsec)
  2. Chart dropdown -> Scatter plot -> set "Error" options (can be const or col expressions)
  3. Check on chart

Copy link
Contributor

@loitly loitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great. Review completed. Free to merge.

}
// set error related parameters
['x', 'y'].forEach((axis) => {
const errorsType = get(flds, [`${axis}.errorsType`]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get() take an array of paths or a string of path.
nothing is wrong with your statement.
but alternatively, you can do

get(flds, `${axis}.errorsType`)  or
get(flds, [axis, 'errorsType'])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not use the alternative ways you have suggested, because the fieldKey contains dot in it, ex. 'x.errorsType'. Since every fieldKey is converted into an object property, this is an example of the property, which can only be accessed using the square bracket notation.

I did it for convenience of mapping between fields and plot parameters, which are not flat as fields. In plot parameters, x is an object with all x-related parameters.

@tgoldina tgoldina merged commit 46de48c into dev Mar 20, 2017
@tgoldina tgoldina deleted the DM-8685_asymErrors branch March 20, 2017 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants