Skip to content
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

Station 2 #49

Merged
merged 3 commits into from
Jan 25, 2020
Merged

Station 2 #49

merged 3 commits into from
Jan 25, 2020

Conversation

mnlevy1981
Copy link
Contributor

Randomly generates 100 lat, lon points and data at said points, then generates a scatter plot where the color of the scatter dot depends on the value at the point. Two plots, one with a legend and one with a color bar:

sphx_glr_station_2_001

sphx_glr_station_2_002

The dot colors don't exactly line up - it's probably possible to bring in cmaps.ncl_default and get the exact same colors, but I think showing the user a list named colors using string names is more informative.

Fixes #21

still need to add RST to generate this file and also create second plot
No need to make an array for the color table, we can just define cmap and then
use c=dummy_data to align everything
Using a legend insted of a colorbar is a little kludgy, perhaps because of how
I draw the plot in the first place.
@clyne clyne self-requested a review January 25, 2020 23:19
Copy link
Collaborator

@clyne clyne left a comment

Choose a reason for hiding this comment

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

Nicely done!

@clyne clyne merged commit 1a8b131 into NCAR:master Jan 25, 2020
@jeff-willison
Copy link

@mnlevy1981: this script does not seem to work as expected. I believe norm (or vmin/vmax) need to be used in the scatter call or else the values don't correspond to the correct colors. Out of the box with hard coded values of 17.5:

Screenshot 2024-12-10 112542

Passing norm as an argument to the scatter call:

Screenshot 2024-12-10 112617

@mnlevy1981
Copy link
Contributor Author

@mnlevy1981: this script does not seem to work as expected. I believe norm (or vmin/vmax) need to be used in the scatter call or else the values don't correspond to the correct colors. Out of the box with hard coded values of 17.5:

Screenshot 2024-12-10 112542

Passing norm as an argument to the scatter call:

Screenshot 2024-12-10 112617

Good catch! I've opened #629

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.

station_2
3 participants