[Thread Prev][Thread Next][Index]

Re: [ferret_users] disappearing lines with polymark



Marco & Ansley,

Actually it's easy: to fully suppress "missing" polygons, just mask
the x or y values.  For example:

  NOAA/PMEL TMAP
  FERRET v6.951 (10/29/2015)
  Linux 2.6.32-573.7.1.el6.x86_64 64-bit - 10/30/15
  3-Dec-15 13:38

! Set up a fake dataset and an empty plot
yes? let xpts = x[gx=-5:5:1]; let ypts = xpts
yes? let val = {-5,-4,,-2,-1,0,1,2,,4,5}
yes? plot/hl=-5:5/vl=-5:5/title=demo 1/0

! Now overlay the polygons, masking out XPTS where VAL is missing
yes? go polymark poly/ov/nolab/key/line/fill "IFV val THEN xpts" ypts
val circle 10

A one-line fix!

Andrew

PS: The following reveals something interesting...  If we enlarge the
polygons so that there's more overlap, then the fills do overwrite
some of the outlines:

yes? go polymark poly/ov/nolab/key/line/fill "IFV val THEN xpts" ypts
val circle 20

Perhaps Ansley can explain this -- is the current polygon's "fill"
drawn before the previous polygon's outline?


On Thu, Dec 3, 2015 at 12:40 PM, Ansley C. Manke
<ansley.b.manke@xxxxxxxx> wrote:
> Hi,
> These are hard problems.
>
> The polymark script should draw the both the circle and outline if you use
> the POLYGON command with both /LINE and /FILL.
>
> GO polymark polygon/over/key/line/fill  xpts,ypts,sst,circle, 0.8
>
> Or, you could do it with two commands but reverse the order, first with
> color and then with /line
>
>     go polymark polygon/over/pal=rainbow3 myvar circle 0.8
>     go polymark polygon/over/line myvar circle 0.8
>
>
> However with either of these options, the black outlines may start to
> obscure the colors where the observations are dense.  The plot you show
> might be preferable.
>
> You  could re-draw the axis line after making the polygons, with something
> like this:
>
>    plot/vs/over/color=black/nolabel {-70,-20}, {0,0}
>
> -Ansley
>
> On 12/3/2015 2:30 AM, Marco van Hulten wrote:
>
> Hello,
>
> I am loading different observational data sets that contain many bad
> values to plot onto model output.  I use
>
>     go polygon polymark myvar circle 1.0
>
> for this.  This works well: only the good values are plotted.  I want a
> line around the circles, so I can use the /line option.  However, then
> I get open circles for both good and bad data.  That I do not want.
>
> So I do this:
>
>     go polygon polymark/over/pal=black    myvar circle 1.0
>     go polygon polymark/over/pal=rainbow3 myvar circle 0.8
>
> This works, except for the problem that when plotting previous lines
> in the plot disappear.  Firstly, if the circles are plotted close to the
> axes lines, some of the axes lines are removed (as they are underlying
> the closed circles).  Secondly, circles close to each other remove the
> lines of the previous circles, resulting in lump of lineless circles
> where observations are dense.
>
> The enclosed figure illustrates these problems.  (It shows some
> phosphate data of the GEOTRACES GA02 transect overlayed in PO4 section
> from the model PISCES-v2 interpolated from the ORCA2 grid onto the GA03
> transect, using the rainbow3 palette that I sent in a previous e-mail.)
>
> If there is no simple solution, would you say this is esthetically
> acceptable?
>
> Marco
>
>


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

Privacy Policy | Disclaimer | Accessibility Statement