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

apply a scale to contour / fill / shade data to handle precision issues #1943

Open
AnsleyManke opened this issue Jul 1, 2019 · 0 comments
Open

Comments

@AnsleyManke
Copy link
Contributor

Plots such as these fail to draw correctly

yes? use coads_climatology; set reg/l=1

yes? shade sst * 1e-39   ! this gives a blank plot
yes? shade sst * 1e-47   ! this gives a constant-zero plot
yes? shade/l=1 sst * 1e34  ! many values interpreted as missing (same for 1e35 to 1e38)
yes? shade/l=1 sst * 1e39  ! blank plot

because data is single precision within the PPLUS code.

A solution would be to scale the data at the time that it's sent from the Ferret-side plot set up routines into PPLUS. Also send the scale factor, so that an annotation can be added to the plot key about that scaling. Even plots that are drawn correctly would see an improvement in the colorbar labeling if scaling were done.

This is really straight forward, but these things would need to be handled:

  • If the user specifies /LEVELS=[levels specification] do we still do the scaling?

  • The levels are saved so that for instance, CONTOUR/OVER/LEVELS re-uses the same set of levels. Or on a new plot /LEVELS qualifier with no levels spec uses the levels that are in place from whatever previous plot has been drawn.

We need some solution for handling these in a graceful way.

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

No branches or pull requests

1 participant