Giter VIP home page Giter VIP logo

Comments (10)

PaulWessel avatar PaulWessel commented on May 22, 2024

Suspect the same is true in grdcontour. Note there are no z-values assigned here so what to contour? 0, 1, and 2? What do you think is good behavior here?

from gmt.

joa-quim avatar joa-quim commented on May 22, 2024

Only place that z can come is from the selected contours them selfs, no? Hopefully that is not too late on the processing flow because we need to plot paint the image before the contours are drawn.

from gmt.

PaulWessel avatar PaulWessel commented on May 22, 2024

Sorry, did not notice -A2. So if your data goes from 0 to 20 and you use -A2 and -C sets three colors there is a problem. I think we would need clean rules for how that may work, if at all.

from gmt.

joa-quim avatar joa-quim commented on May 22, 2024

I am assuming that we would interpolate the colors into the number of required intervals. Something like what happens in grdimage lixo.grd -Cred,green -JX10 > lixo.ps, though this not an equivalent case.

from gmt.

PaulWessel avatar PaulWessel commented on May 22, 2024

Let's define what should happen first. So in this case -C is either a master table (e.g., -Crainbow) or -Ccolor1,color2,...,colorn that defines a user "master" table, meaning the z-values in it are not the desired contour levels. Two cases:

  1. -A is given. Then we calculate contour intervals from dataset min/max rounded to multiples of and sample the CPT accordingly.
  2. No -A is given. We then arbitrarily decide on 10 contours from min to max as the default contours. Or perhaps we should compute a sensible rounded interval based on range? Nobody wants 7.37889, 9.3466, etc as the contours.

from gmt.

PaulWessel avatar PaulWessel commented on May 22, 2024

BTW, this probably applies to grdcontour as well.

from gmt.

joa-quim avatar joa-quim commented on May 22, 2024

I'm not sure it worth the trouble of doing 2. If min/max is [0.3 0.7] it will be hard to figure out a good contour interval that does not have many decimals.

from gmt.

PaulWessel avatar PaulWessel commented on May 22, 2024

Well, we do this routinely with -Baf, but it is a bit different. Here, usually a log10 of the range, floored, then raising 10 to that power gives a decent interval, in this case 0.1. That gives n = 5 contours so we can check if n < 10 then double it. So n = 10 and 0.05. Not so bad for a default system when user dont care.

from gmt.

PaulWessel avatar PaulWessel commented on May 22, 2024

Update: Both pscontour and grdcontour has this auto-contour settings. However, if you give a master cpt or a list of colors then presumably you want to color the contours using those colors. Thus the cpt will need to be resampled at the computer contour levels. This is not implemented yet.

from gmt.

stale avatar stale commented on May 22, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

from gmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.