Dear William,Thanks for your answer. I definitely agree with you that Ferret is doing a wonderful job for contours, and plotting in general (especially time).Concerning the contour, I did try CONSET at one point, but I did not play with SHAKEY because I only plot contours.PPL CONSET did not solve my problem:use coads_climatology.cdf
contour/x=50w:20e/y=30s:30n/lev=(20,23,1)/set SST[l=@ave]ppl CONSET 0.08 1 1 0.04 0.04 0.0
ppl contourVijith indicated me a nice solution based on the ndigit inputs in /LEVELS=(lo, hi, delta, ndigits)"ndigits (applies to CONTOUR command only) is the number of decimal places to use when labeling the level on individual contour lines as: -1 for integer format or -3 to omit numerical labels"It works perfectly.For the FILL/SHADE commands, I discovered it when I plotted some symmetric color scale for wind stress anomalies, which were not symmetric because of the missing last level... To obtain the right plot, I just added an extra level in the /LEVELS command, such as:shade/x=50w:20e/y=30s:30n/levels=(0.014,0.030,0.001) SST[l=@ave]/1000plots a color scale starting at 0.014 and ending at 0.029.I do not understand why some specifications work and some do not. I will pay extra attention to my color scale, just in case the top-level disappears.Many thanks,Serena.¸. , . .·´¯`·
><(((º> `·.¸.·´¯`·...¸><(((º>¸.¸. , . .·´¯`· ><(((º> .
`·.¸.·´¯`·...¸><(((º> .
.
Serena ILLIG-THEVENIN LEGOS/IRD ..Editorial Board Member for Scientific Reports ..14 Av. E. Belin .31400 Toulouse .
FRANCE ..E-mail : serena.illig.ird@xxxxxxxxx .Web-site : http://sillig.free.fr .Phone : +33 5 61 33 29 26 ..
<º)))><..·On Tue, Jun 21, 2022 at 5:57 PM William Kessler - NOAA Federal <william.s.kessler@xxxxxxxx> wrote:Hi Serena (also responding to your earlier message about contour levels).First, contouring, while conceptually straightforward, is a hard thing to program. Figuring out where to put contour labels without obscuring other contours or overwriting other labels is again something that a human would do easily, but hard to specify in an algorithm. How many labels is "enough"? In my experience, Ferret does a better job of this than some others.The two commands you need to control this are PPL CONSET and PPL SHAKEY; that is, you need to give your CONTOUR/SHADE/FILL command with /SET, then specify the two PPL commands, then draw the plot with PPL CONTOUR/SHADE/FILL.PPL CONSET,hgt,nsig,narc,dashln,spacln,cay,nrng,dslab ! controls the contouring and labelingPPL SHAKEY [0=nokey,1=key] [0=hor,1=vert] lab-size lab-inc lab-dig lab-len xlo xhi ylo yhi ! controls the color keyThese are described in the "Enhanced commands" section, Appendix C 2.2 and C 2.4(Some of CONSET can also be controlled by qualifiers to CONTOUR, or by its /LEVELS options; see CONTOUR)With respect to occasional missing end values in the colorbar, I think this may be the result of rounding somewhere in the calculation (???). You can often work around this by tweaking the upper or lower bound by a tiny amount. E.g.,If the original command fails:shade/x=50w:20e/y=30s:30n/levels=(0.014,0.029,0.001) SST[l=@ave]/1000
Try:
shade/x=50w:20e/y=30s:30n/levels=(0.013999,0.029,0.001) SST[l=@ave]/1000or:
shade/x=50w:20e/y=30s:30n/levels=(0.014,0.029001,0.001) SST[l=@ave]/1000I don't know why these sometimes succeed when the apparently correct specification fails!BillyOn Tue, Jun 21, 2022 at 4:52 AM Serena Illig <serena.illig.ird@xxxxxxxxx> wrote:Dear Ferret users,
I hope this email finds you well.
I am writing regarding some contour labels. I am using PyFerret v7.63 on Linux Ubuntu (via miniconda) but I have the same issues with PyFerret v7.62 and ferret v6.71.
I noticed a problem in the number of colors associated with the FILL or SHADE commands. When I use SHADE and I increase the number of levels, there are some cases for which the last level range is not drawn and is missing in the color scale. It happens when the quantity drawn is small (for instance wind stress in N/m2).
Here are 3 examples:
use coads_climatology.cdfshade/x=50w:20e/y=30s:30n/levels=(14,29,1) SST[l=@ave]---> 15 color levels, with levels 0(1), the colorscale is OK
shade/x=50w:20e/y=30s:30n/levels=(0.014,0.029,0.001) SST[l=@ave]/1000
---> 15 color levels, with levels 0(1/1000), the colorscale is missing the last level
shade/x=50w:20e/y=30s:30n/levels=(0.014,0.028,0.001) SST[l=@ave]/1000
---> 14 colors levels with levels 0(1/1000), the colorscale is OK
fill/x=50w:20e/y=30s:30n/levels=(0.0014,0.0029,0.0001) SST[l=@ave]/10000---> 15 colors levels with levels 0(1/10000), the colorscale is missing the last levelI could not find any rules for which it happens. I thought at first that it is linked to the number of levels, but I found counter-examples (see my last example above).Maybe this issue has already been reported?
Have a nice day,
Serena Illig.¸. , . .·´¯`·
><(((º> `·.¸.·´¯`·...¸><(((º>¸.¸. , . .·´¯`· ><(((º> .
`·.¸.·´¯`·...¸><(((º> .
.
Serena ILLIG-THEVENIN LEGOS/IRD ..Editorial Board Member for Scientific Reports ..14 Av. E. Belin .31400 Toulouse .
FRANCE ..E-mail : serena.illig.ird@xxxxxxxxx .Web-site : http://sillig.free.fr .Phone : +33 5 61 33 29 26 ..
<º)))><..·