Re: plotting (top bottom or bottom top?)

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 14 2014 - 12:54:25 MDT

Hi Paula,

NCL always wants to put the minimum value at the bottom left corner by default.

If you want to the minimum to be at the top left, then set:

  res@trYReverse = True

This will cause it to reverse your Y axis. Likewise for trXReverse, if you want the minimum value on the right.

See example "axes_2.ncl" at:

http://www.ncl.ucar.edu/Applications/axes.shtml#ex2

--Mary

On Apr 8, 2014, at 4:48 PM, Paula Doubrawa <pdoubraw@indiana.edu> wrote:

> Hello, all-
>
> Normally, the way we think of arrays is starting at the upper left corner, so that it looks something like:
>
> x (0,0) x (0,1) x (0,2)
> x (1,0) x (1,1) x (1,2)
> x (2,0) x (2,1) x (2,2)
>
> When we call a plotting routine, the origin is at the bottom left corner, so I am assuming NCL does this up-down flipping automatically (as does matlab when you call a contour, for example).
>
> My question: Is there is a plotting routine in ncl that plots the array AS IS, with the origin in the upper right, so we can look at the data in its original form, as we would with imagesc for example in matlab? If not, is it really equivalent to just use ::-1 indexing to reverse the rows?
>
> I am sorry if this sounds silly, I just get really confused with indexing and I can't find the right words to put on a search bar...
>
> Thanks a lot for your help,
> Paula
>
>
> --
> Paula Doubrawa
> PhD Student
> Atmospheric Sciences Program
> Department of Geological Sciences
> Indiana University
> _______________________________________________
> 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 Mon Apr 14 12:54:35 2014

This archive was generated by hypermail 2.1.8 : Tue Apr 15 2014 - 10:45:19 MDT