Hi Ferreters, hi Ansley,
My problem with *polymark* is an unwanted shift in the time axis. First, I use a 'plot' command to set the axes for a pressure vs. time plot, followed by a polymark/over command for prettier filled symbols colored according to a third variable. Compared to the 'plot' command which seems OK, the polymark/over is shifted in time by a couple of hours. I attached a figure comparing plot/ribbon and polymark, using the same data, but with pressure in polymark shifted by +20 hPa and +40 hPa to clearly separate the lines.
The relevant commands for the attached figure are:
! make empty plot with correct axes
def ax/T="06-AUG-2007 22:00:00":"15-AUG-2007 01:12:00":0.2/t0="06-AUG-2007 22:00:00"/unit=hour axt
plot/vlim=600:200:100 t[gt=axt@ave]*0
! within a loop, trajectory data is plotted; here only the most relevant commands:
def sym levs = "(-inf)(-60,60,10)(inf)"
plot/ov/nolab/rib/lev=($levs)/thick=3/sym=27/size=0.15 press[gt=axt@ave]/100,mixcs[gt=axt@ave]*scale;\
go polymark polygon/over/noax/lev=($levs)/($key)/nolab t[gt=axt@ave] press[gt=axt@ave]/100+20 mixcs[gt=axt@ave]*scale circle 1;\
To make polymark plot the correct positions, I have to 'crop' the data to only defined values, see also attached figure:
GO polymark POLYGON/over/noax/lev=($levs)/($key)/nolab/l=18:977 t[gt=axt@ave] press[gt=axt@ave]/100+40 mixcs[gt=axt@ave]*scale circle 1;\
My data has varying numbers of undefined values at the beginning and end of the time axis, due to a common time axis for several trajectories to span the longest common time period. This is how I now automated the 'cropping' of the data to blocks of defined values (I luckily never have undefined values in the middle of the block):
let ind = IF (mixcsf OR mixcsf EQ 0) THEN L[gt=mixcsf];\
let indd = ind[l=1:`ind,ret=lsize`];\
GO polymark POLYGON/over/noax/lev=($levs)/($key)/nolab/l=`indd[l=@min]`:`indd[l=@max]` t[gt=axt@ave] press[gt=axt@ave]/100 mixcs[gt=axt@ave]*scale circle 1;\
It would be helpful if scripts like polymark worked with undefined data instead of having to crop the data to all-defined values.
Best regards,
Hella
P.S. Note: indd has to be defined in addition to ind above, because defining a variable (like ind above or b below) from another variable's axis indices (L[gt=mixcsf] above, i[gx=a] below) generates the new variable with unlimited points (abstract axis). This is in contrast to defining a variable from the other variable values (see variable c below): in the latter case, the new variable is limited to the defined points on the axis as expected.
yes? let a = {1,2,3}
yes? list a
VARIABLE : {1,2,3}
SUBSET : 3 points (X)
1 / 1: 1.000
2 / 2: 2.000
3 / 3: 3.000
yes? let b = if (a or a eq 0) then i[gx=a]
yes? list b
**ERROR: dimensions improperly specified: 99999999 words were requested.
*** NOTE: Check for unspecified limits on an ABSTRACT axis
*** NOTE: Use the SHOW GRID command to see the axes
yes? show grid a
GRID XABSTRACT
name axis # pts start end
ABSTRACT X 99999999 r 1 1.E+08
normal Y
normal Z
normal T
normal E
normal F
yes? let c = if (a or a eq 0) then a
yes? list c
VARIABLE : IF (A OR A EQ 0) THEN A
SUBSET : 3 points (X)
1 / 1: 1.000
2 / 2: 2.000
3 / 3: 3.000
Attachment:
ferret_plot_vs_polymark_timeshift.png
Description: PNG image