Re: contour problem

From: ahmed lasheen <ahmed4kernel_at_nyahnyahspammersnyahnyah>
Date: Fri May 11 2012 - 14:50:30 MDT

Thanks alot
when I put the values of pressures and height explicitly , I found that it
works , and I got both the straight line and the equal height distances. (I
am not sure if this makes the changes).I have attached the image and also
the script.

On Fri, May 11, 2012 at 12:57 AM, Mary Haley <haley@ucar.edu> wrote:

> We believe you are seeing the correct behavior. As described by Dave:
>
> The second plot warps the coordinate space relative to the first plot.
> That would inevitably lead to straight lines becoming curved.
>
> For example, the distance between 0 and 1000 on the first Y Axis is much
> greater than the distance between 9000 and 10000. If the line has constant
> slope under those conditions then when you equalize the distance the lines
> would need to have different slopes in those regions to cover the same
> distance along the X-Axis.
>
> --Mary
>
> On May 9, 2012, at 3:11 PM, ahmed lasheen wrote:
>
> > Thanks
> > yes, it works . But as you said the axis will not be linear (the height
> is reduced in log fashion)
> > is there a method for having both linear axis with linear curves.
> > I cannot figure out why when the Y axis is aligned uniformally , I found
> the curved lines and
> > when the Y axis is aligned irregularly , I found the straight lines.
> >
> >
> > On Tue, May 8, 2012 at 6:20 PM, Mary Haley <haley@ucar.edu> wrote:
> > You also need to comment:
> >
> > ;plot_res@trYAxisType = "LinearAxis"
> >
> >
> > If you want a linear axis, you need to do this:
> >
> >
> > plot_res@gsnYAxisIrregular2Linear = True
> >
> > This will cause your lines to curve again, though, because now your Y
> axis is aligned differently.
> >
> > --Mary
> >
> > On May 8, 2012, at 9:52 AM, ahmed lasheen wrote:
> >
> > > thanks
> > > I do it , and the temperature lines are really straight but the y axes
> > > is only to 10 not to 18000.(the y axes reduced alot)
> > > and I got the following error .
> > > warning:ContourPlotSetValues: coordinate spacing is irregular; linear
> spacing only possible using index coordinates for Y Axis.
> > >
> > >
> > > On Tue, May 8, 2012 at 4:32 PM, Mary Haley <haley@ucar.edu> wrote:
> > > Ahmeed,
> > >
> > > Try commenting out
> > >
> > > plot_res@trGridType = "TriangularMesh"
> > >
> > > and let me know if you get what you expect.
> > >
> > > --Mary
> > >
> > > On May 8, 2012, at 3:56 AM, ahmed lasheen wrote:
> > >
> > > > Hello
> > > > thanks for your reply , both methods works.
> > > > But I am amazed that the contour lines of temperature is not
> straight ,it is curved although it should be straight .
> > > > I used the function write_matrix to plot the contour as a matrix to
> see
> > > > it and I found that it is really straight. I have attached the data
> text
> > > > , image , and code with the three lines added of function
> write_matrix.
> > > > is there is some kind of interpolation made by sfxArray or
> gsn_csm_contour.
> > > > thanks
> > > >
> > > > On Mon, May 7, 2012 at 5:16 PM, Mary Haley <haley@ucar.edu> wrote:
> > > > Hi,
> > > >
> > > > You are using "gsn_contour", which is a generic contouring routine
> that doesn't look for coordinate arrays attached to your data.
> > > >
> > > > You either need to use gsn_csm_contour instead, which will look for
> coordinate arrays, or, you need to add the following two lines:
> > > >
> > > > plot_res@sfYArray = z1
> > > > plot_res@sfXArray = temp
> > > >
> > > > --Mary
> > > >
> > > > On May 6, 2012, at 7:14 AM, ahmed lasheen wrote:
> > > >
> > > > > Hello
> > > > > I have a problem in plotting temperature field on scale certain x
> and y axis that differ from the index scale
> > > > > of the temperature field itself. .
> > > > > when I plot it , i found that the x and y axis change
> automatically to the index , how can i solve that?
> > > > > I have attached output image without plotting temperature and
> other with plotting the temperature.
> > > > > I have also attached the code
> > > > > thanks in advance
> > > > >
> > > > > --
> > > > > ===============
> > > > > Ahmed Lasheen
> > > > > Junior researcher at Cairo Numerical Weather Prediction Center
> (CNWPC)
> > > > > Egyptian Meteorological Authority(EMA)
> > > > > Cairo,Egypt
> > > > > ===============
> > > > >
> > > > >
> <without_temp.png><with_temp.png><exp1.ncl>_______________________________________________
> > > > > ncl-talk mailing list
> > > > > List instructions, subscriber options, unsubscribe:
> > > > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ===============
> > > > Ahmed Lasheen
> > > > Junior researcher at Cairo Numerical Weather Prediction Center
> (CNWPC)
> > > > Egyptian Meteorological Authority(EMA)
> > > > Cairo,Egypt
> > > > ===============
> > > >
> > > >
> <Screenshot.png><withtemp.png><exp1.ncl>_______________________________________________
> > > > ncl-talk mailing list
> > > > List instructions, subscriber options, unsubscribe:
> > > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > >
> > >
> > >
> > >
> > > --
> > > ===============
> > > Ahmed Lasheen
> > > Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> > > Egyptian Meteorological Authority(EMA)
> > > Cairo,Egypt
> > > ===============
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> >
> >
> > --
> > ===============
> > Ahmed Lasheen
> > Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> > Egyptian Meteorological Authority(EMA)
> > Cairo,Egypt
> > ===============
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt
===============



_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

withtemp.png
Received on Fri May 11 14:51:30 2012

This archive was generated by hypermail 2.1.8 : Thu May 17 2012 - 13:42:02 MDT