[Thread Prev][Thread Next][Index]

Re: [ferret_users] "set win/aspect=1" and "set mode linecolors"---Strange interaction



Hi Ryo,

It's a property of MODE LINECOLORS that it takes effect on the next new window.  So I would expect to need to do the linecolors setting before a SET WINDOW command. 

The linecolors capability was developed before the implementation of PyFerret, so there will be internal settings having to do with opening and sizing a window that are different in PyFerret than in classic Ferret and that might account for the particular weird behavior and the fact that the linecolors setting does seem to take effect even in the case where you're doing the SET WINDOW first.  But I expect that things should work correctly if you do the MODE LINECOLORS before any SET WINDOW

Ansley


On 6/24/2021 10:39 PM, Ryo Furue wrote:
Dear Ferreters,

I've found a strange interaction between "set win/aspect=1" and "set mode linecolors".  When both are present, the image produced with

pyferret -nodisplay -script example.jnl

is truncated on the right side!

If you swap the order of "set win" and "linecolors", the image is fine; or if you comment out one of them, the image is fine, too.

My motivation is like this: I set window/aspect=1 in my ~/.ferret file to avoid the little bug we discussed on this mailing list some time ago.  In my ~/.ferret, I also do

set mode linecolors:9
ppl color,2,  . . . 
. . .

to use a color-blind–friendly set of colors for line graphs.

These two settings somehow interfere with something to produce the truncated image.  A workaround seems to be to switch the order between the two settings.

I use PyFerret v7.63 on macOS 11.4 (Big Sur).

! --- example.jnl: The PNG file is truncated!
!set window 1 ! <-- fine
set window/aspect=1
set mode linecolors:9


set data coads_climatology
shade/vlimits=-38:-5:2/hlimits=108:136:2/nolabel SST[l=1]
define symbol imgfile tmp.png
SPAWN rm ($imgfile)
frame/file=($imgfile)


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement