# Re: plotting of different order value in one plot

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 14 Nov 2006 15:44:33 -0700 (MST)

> I am trying to plot a XY diagram for six different cases. I have got the
> values of Y of the order of 10^ (-5), 10^ (-9) and 10^ (-12) for the value
> of X ranging from 0 to 20 for respective cases.
>
> I want that all the cases are in same plot but I failed due to the wide
> range of Y values because my plot only contain one or two cases that have
> nearly same order. Is there any way
>
> that I can plot all cases in one plot except changing the scale of Y axis
> in to logarithmic scale.
>
> Any help will be appreciated
>-------------------------------

I'm sure there are better ways but

[1] scale the y-values by * 1e5/1e9/1e12
Then have a legend that has

data = new ( (/3,N/),"float")
data(0,:) = ya*1e5
data(1,:) = yb*1e9
data(2,:) = yc*1e12
data_at_long_name = "..."
;data_at_units = "scaled"

res = True ; plot mods desired
res_at_pmLegendDisplayMode = "Always" ; turn on legend

res_at_pmLegendSide = "Top" ; Change location of
res_at_pmLegendParallelPosF = .45 ; move units right
res_at_pmLegendOrthogonalPosF = -0.4 ; move units down

res_at_pmLegendWidthF = 0.15 ; Change width and
res_at_pmLegendHeightF = 0.18 ; height of legend.
res_at_lgLabelFontHeightF = .03 ; change font height
res_at_lgTitleOn = True ; turn on legend title
res_at_lgTitleString = "scale" ; create legend title
res_at_lgTitleFontHeightF = .025 ; font of legend title
res_at_xyExplicitLegendLabels = (/"10^5","10^9","10^12"/)
res_at_xyLineColors = (/"blue","red","green"/)

plot=gsn_csm_xy(wks,x,data,res)

[2] use gsn_csm_xy3

good luck
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 14 2006 - 15:44:33 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 16 2006 - 13:32:39 MST