[Thread Prev][Thread Next][Index]

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



Thanks for this info.

I have a possibly-related problem in PyFerret v7.63 on MacOS 10.14.6 (Mojave).

No matter what I do with LINECOLORS or SET WINDOW, the plot looks fine on the screen but the png output of FRAME is _always_ cut off in the same way, showing roughly the upper-left 60% of the plot.

Anyone else have this problem ... and found a solution?

Thanks ... Billy Kessler

On Fri, Jun 25, 2021 at 7:43 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Ansley,

Thank you for the important information about MODE LINECOLORS.  I've switched the order in my ~/.ferret so that "SET WINDOW" comes after the color settings.  This should be the solution.

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.

Off-topic question.  Are these color settings

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

set window/aspect=1
 
supposed to be ignored for a second window

set window 2

?  What I find is that the new colors work only for the first window.

Ryo
  

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)



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@xxxxxxxx
Tel: 206-526-6221
Fax: 206-526-6744

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

Privacy Policy | Disclaimer | Accessibility Statement