Fwd: [ncl-talk] Strange pattern fill issue with stippling when plotting wind barbs.

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 19 2014 - 14:09:58 MDT

Hi Mary,

Do we have a nightly automated build that will produce a suitable distro
for this guy?

---------- Forwarded message ----------
From: Philippe Papin <ppapin@albany.edu>
Date: Fri, Jun 13, 2014 at 8:28 AM
Subject: Re: Strange pattern fill issue with stippling when
plotting wind barbs.
To: Rick Brownrigg <brownrig@ucar.edu>


Hi Rick,

Thanks for taking the time to look at this and come up with a fix! My
system information is below.

Linux ash.atmos.albany.edu 2.6.18-348.16.1.el5 #1 SMP Wed Aug 21 04:00:25
EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

Really appreciate the help!

-Philippe






On Wed, Jun 11, 2014 at 5:32 PM, Rick Brownrigg <brownrig@ucar.edu> wrote:

> Hi Philippe,
>
> After looking through the wind-barb code, I am all but certain your
> speculation is correct! It will take some more time to gen-up an example
> and test the fix, but the fix looks to be a one-liner. Unfortunately, I
> can't come up with a work-around -- this happens at such a low level in the
> graphics code, its hard to undo the change-of-state from the NCL level.
>
> The best I may be able to do is to get you a new ncl binary once a fix is
> tested/verified. For that, I would need to know what system you are using:
>
> uname -a
>
> In the meantime, I'm filing this as a bug, and I will also make or amend a
> ticket for an option to thicken up patterned lines.
>
> Thanks for your awesome clues in pinpointing the issue!
> Rick
>
>
>
> On Sun, Jun 8, 2014 at 9:43 PM, Philippe Papin <ppapin@albany.edu> wrote:
>
>> Hi NCL talk,
>>
>> I've been making a series of images that use the stipple pattern fill
>> option for a contour interval. However, I've encountered some strange
>> behavior when this stippling is used for multiple images created using a do
>> loop. I am using *NCL* *v.6.1.2* to make these images.
>>
>> The datasets and resources used to create these two figures are
>> identical, the only difference being that a counter was incremented using a
>> do loop to make another image.
>>
>> Here are two images:
>>
>> *First image: *
>> http://www.atmos.albany.edu/student/ppapin/lb13_img/test/pure_gyre_sr_comp_850geo_test_0.png
>>
>> *Second image (after incrementing looper by one)*
>>
>> http://www.atmos.albany.edu/student/ppapin/lb13_img/test/pure_gyre_sr_comp_850geo_test_1.png
>>
>> As you can see, the stippling does not display the same way, with the
>> second image having "hollow" stipple dots rather than the filled stipple
>> dots of the first image.
>>
>> Here are the resources used to create the pattern fill stippling:
>>
>> * cssres@cnLinesOn = True*
>> * cssres@cnFillOn = True*
>> * cssres@cnLevelSelectionMode = "ExplicitLevels"*
>> * cssres@cnLevels = (/95/) ; set the contour levels*
>> * cssres@cnFillColors = (/"transparent","gray20"/)*
>> * cssres@cnLineLabelPlacementMode = "Constant"*
>> * cssres@cnLineThicknessF = 3.0 *
>>
>> * cssres@cnFillPattern = 17*
>> * cssres@cnFillScaleF = .7*
>> * cssres@cnFillDotSizeF = .0045*
>> * cssres@cnLineColor = "gray20"*
>> * cssres@cnLineLabelsOn = False*
>> * cssres@cnInfoLabelOn = False *
>> * cssres@lbLabelBarOn = False*
>>
>> And when plotting:
>>
>> *do i=0,1*
>>
>>
>> *mpid = gsn_csm_map(wks,mpres)*
>> *vcid = gsn_csm_vector(wks,u850_anom,v850_anom,vcres)*
>> *ssid = gsn_csm_contour(wks,g850_ss,cssres)*
>>
>> *overlay(mpid,ssid)*
>> *overlay(mpid,vcid)*
>>
>> *....*
>>
>> *end do*
>>
>> My hypothesis after a little bit of testing is that the vector plot
>> option *vcres@vcGlyphStyle = "WindBarb"* is modifying the way the
>> stippling is displayed, transforming the stipple dot objects from solid to
>> hollow (so that the calm hollow circle for wind barbs can be plotted). The
>> problem is these dots don't change back to solid for the *cssres*
>> resource the next time the image is plotted.
>>
>> Is there away around this? I can just rearrange the way I am overlaying
>> the patterned contour so that the two images plot the same way, but I'd
>> rather have solid filled stippling dots, and that doesn't seem possible
>> when I am also plotting wind barb vector objects.
>>
>> I'd be happy to provide more code to troubleshoot, although the script
>> this is from is a bit cumbersome, so I hope these snippets are enough to
>> diagnose my problem.
>>
>> Thanks,
>> -Philippe
>>
>> P.S. I dug around the ncl-talk archives, and saw a previous thread
>> stating there currently is no way to make *thicker* pattern lines from
>> the available options
>> <https://www.ncl.ucar.edu/Document/Graphics/Images/fillpatterns.png> other
>> than just changing the scaling. Count me as one of those that would like to
>> see an option to make thicker patterned lines.
>>
>>
>> -------------------------------------
>> Philippe P. Papin
>> Dept. of Atmospheric and Environmental Sciences
>> University at Albany, SUNY
>> 1400 Washington Ave, Albany, NY 12222
>> http://www.atmos.albany.edu/student/ppapin/
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


--
-------------------------------------
Philippe P. Papin
Dept. of Atmospheric and Environmental Sciences
University at Albany, SUNY
1400 Washington Ave, Albany, NY 12222
http://www.atmos.albany.edu/student/ppapin/

Received on Thu Jun 19 08:09:58 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT