[ncl-talk] @gsMarkerIndex = 4 plots not really a circle but looks angular, jerky . How can I (easily) improve its shape?

Mary Haley haley at ucar.edu
Thu Dec 1 09:41:20 MST 2016


Erik

If this is a marker you want to put on map, then you can use a procedure
called "nggcog". This will generate a lat/lon circle given a center lat/lon
value. It mimics the Matlab scircle1 function

http://www.ncl.ucar.edu/Document/Functions/Built-in/nggcog.shtml

If you are not drawing markers on a map, then we have an unadvertised
function in "shea_util.ncl" called "circle_ll", contributed by Arindam
Chakraborty. It will draw circles or ellipses.  Here's the documentation,
which is found in the comments of the function in shea_util.ncl:

; Draws a circle (or ellipse) or radius (or x-axis length) r centered at
; (x0,y0). Optionally it can draw an ellipse and axes can be rotated as
desired. ; Input Parameters:
; wks: graphics workstation
; plt: the plot graphics
; (x0,y0): center of the circle in terms of plot coordinate
; r: radius (or x-direction length) of the circle in terms of plot
coordinate
; res: resources. If true can take any line graphic parameter valid
; gsn_add_polyline. In addition, there are two special resources
; for this procedure:
;      Scale: The scale by which the y-axis length should be modified to
; the x-axis length. This can be used to plot an ellipse. (default=1).
;      Rotation: The rotation angle (in degrees) by which the axes are
rotated
; (positive anticlockwhise). (default=0).
;

I've attached two sample scripts that you can run.


--Mary


On Thu, Dec 1, 2016 at 8:46 AM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi Erik,
>
> I'm afraid that's the nature of the polymarker implementation.  It might
> be possible for you to create your own circles, with a finer resolution,
> using NhlDataPolymarker. I have no experience with using it, so can't
> advise further"
>
> http://ncl.ucar.edu/Document/Functions/Built-in/NhlDataPolymarker.shtml
>
> Hope that helps...
> Rick
>
> On Thu, Dec 1, 2016 at 7:12 AM, Erik Jan Schaffernicht <
> eschaffe at uni-koeln.de> wrote:
>
>> Hi,
>>
>> I use:
>>
>> res at gsMarkerIndex = 4
>>
>> to plot hollow circles.  But their circumferences/scopes look polygonal
>> angular and jerky.  See pic attached.
>>
>>  Is their an easy way to improve this?
>>
>> Something about my pdf resolution?
>>
>> Or can I change sthg. in my wks output settings?
>>
>> Or is there another   "hollow circle"   glyph I can select, that looks
>> more like a *round* circle?
>>
>> Thanks for your consideration,
>>
>> Erik
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161201/defde175/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: circle_ll.ncl
Type: application/octet-stream
Size: 1004 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161201/defde175/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nggcog.ncl
Type: application/octet-stream
Size: 680 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161201/defde175/attachment-0001.obj 


More information about the ncl-talk mailing list