[Thread Prev][Thread Next][Index]

Re: [ferret_users] Puzzling metafile error with Fprint



Hi Billy, Ansley et al.

Using the command PPL CLSPLT before CAN MODE META did not help with the problem and, since using other symbols works ok, it appears that sym=dot is doing something funny with the metafile. However, using Ansley's example below generated a viable metafile/postscript - can't work it out!

...Anway, in the end it seems that the best solution for me is to use the mp_polymark script:

let lon = x[gx=my_var] + 0*y[gy=my_var]
let lat = 0*x[gx=my_var] + y[gy=my_var]
go mp_polymark poly/over/palette=black/nolab/lev=(0.9)(1.1) xsequence(lon),xsequence(lat),xsequence(signif),circle,0.2

Thanks again to Ansley and Billy for the replies - got something like I wanted now.

Paul

On 25 Feb 2009, at 18:20, Ansley Manke wrote:

Hi Paul,
If Billy's suggestions aren't the whole answer -  a couple more quick ideas.

To use polymark, call the map-projection script mp_polymark.jnl Try running this demo script:
yes? go mp_stereo_demo
which shows the call to mp_demo. So that's one answer.

Trying the PLOT/VS command, I ran this test, and did not get an error when calling Fprint.
Why don't you give it a try too:
yes? set mode meta
yes? go mp_stereo_demo
yes? let rmask = if rose gt 2000 then 1
yes? plot/vs/over/nolab/color=red/sym=dot  x_page*rmask, y_page*rmask

For debugging  purposes, you might also try it with a different symbol, and a small size.  The /sym=dot makes a different graphics call from other symbols, and might be putting something funny in the metafile. Something like this:
plot/vs/over/nolab/sym=25/siz=0.01 ...
Are you running Fprint with any special settings?


Paul Young wrote:
Hi all,

I'm having a problem generating a postscript file using Fprint. I get the following error:

GKSM item 12121226 is undefined
ggetgksm()  163 Metafile item is invalid
greadgksm()  162 No item is left in GKS Metafile input

which I have not had any luck finding on these forums or via google.

Essentially, the problem seems to be related to my "shading" certain areas of a fill/ plot with plot/vs. Here's a sketch of what I am doing:

use my_data1.nc     !Time series of (e.g.) winter averages
use my_data2.nc

let variance1 = my_var1[d=1,t=@var]  !Standard deviation calculation
let sd1 = variance1^0.5

let delta = my_var2[d=2,t=@ave] - my_var1[d=1,t=@ave]
let signif = if abs(delta) gt sd1 then 1 else 0

set region/x=0:360/y=-90:-20              !Define SH region

set grid delta
go mp_stereographic_south 0 -40
fill/noaxes/nolab/lev=(-80)(-40,40,10)(80)/y=-90:-20/set delta, x_page, y_page
ppl title "1981to1986 - 1979to1980: Dec-May Avg"
ppl fill
go mp_land

plot/vs/over/sym=dot/nolab  x_page*signif, y_page*signif

-----
Removing the plot/vs removes the error, so I guess this is where things are going awry.

Btw, I tried using the polymark.jnl script to shade the data, but it just shaded a ring around the south pole - don't think I've got the command quite right:

go polymark poly/pal=black/over  xsequence(x_page), xsequence(y_page), xsequence(signif), circle, 0.2

As usual, thanks for any help,

Paul


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement