Re: xy plot with x-axis and y-axis intercepting at (0, 0)

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 06 2010 - 10:03:23 MDT

Hi Erwan,

Your timing is uncanny, as the NCL developers were discussing this for the first time ever yesterday.

It's not a trivial thing to do, and I don't think we've ever created an example of this. Dave Brown sent something
internally that might help:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
wks = gsn_open_wks("x11","gsun01n")

res = True
res@pmTickMarkDisplayMode = "always"
res@tmXMajorGrid = True
res@tmYMajorGrid = True
res@tmXMajorGridLineColor = "gray"
res@tmYMajorGridLineColor = "gray"
res@tmBorderLineColor = "gray"
res@gsnMaximize = True

res@trXMinF = -10 ; or whatever
res@trXMaxF = 10
res@trYMinF = -10
res@trYMaxF = 10

id = gsn_blank_plot(wks,res)

pres = True
pres@gsLineThicknessF = 3.0
gsn_polyline(wks,id,(/-10,10/),(/0,0/),pres)
gsn_polyline(wks,id,(/0,0/),(/-10,10/),pres)
frame(wks)

This doesn't put tickmarks or labels on the axis line, however. We may try to come up
with a more complex example for this.

--Mar

On Aug 5, 2010, at 2:00 PM, Erwan Monier wrote:

> Hi,
>
> I was trying to find out how to create a xy plot where the x-axis and
> y-axis intercept for x=0 and y=0 so that the two axis appear as a
> cross (+). In other words, all negative values on the x-axis would be
> located on the left side of the y-axis. I have not found any examples
> and am wondering if that's even possible to do.
> Please let me know,
> Thank you
>
> Erwan
> _______________________________________________
> 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
Received on Fri Aug 6 10:03:28 2010

This archive was generated by hypermail 2.1.8 : Tue Aug 17 2010 - 15:33:24 MDT