<div dir="ltr">Thanks Adam, but please have a look at this bar charts plot i did it with the script attached and it works with:<div> res@gsnXYBarChartColors = "blue"</div><div> plots1 = gsn_csm_xy(wks, x, y_a1, res)</div><div> res@gsnXYBarChartColors = "gold"</div><div> plots2 = gsn_csm_xy(wks, x+0.15, y_b1, res)</div><div> res@gsnXYBarChartColors = "green"</div><div> plots3 = gsn_csm_xy(wks, x+0.30, y_c1, res)</div><div> I want to do the same in a scatter plot and to add 2 other y axis.</div><div>I could not recognize my mistake!</div><div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1hD9GiUCEqvOsbj7O3a4AxyzkfRK2wx22/view?usp=drive_web" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom">dox_AllGSAs_2014landing.eps</span></a><img src="//ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="display:none; opacity: 0.55; cursor: pointer; float: right; position: relative; top: -1px; "></div><br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 17 janv. 2019 à 23:35, Adam Phillips <<a href="mailto:asphilli@ucar.edu">asphilli@ucar.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Amal,<div>Looking at your script, line 66 is this:<br>plots1 = gsn_csm_xy(wks,x,y_a1,res)<br></div><div>So NCL is failing on the plot call. Looking at how you are setting x and y_a1:</div><div> y_a1 = dim_avg_n_Wrap(dox_ave_a1,(/1,2/)) <br></div><div>x = (/1/)<br></div><div><br></div><div>NCL returned a list of error messages to you, but the most important one is the first one:</div><div>fatal:CheckArray:Each vector in the caXArray array must have at least 2 elements<br></div><div><br></div><div>Your x array has one element. Assyming y_a1 is a 1D array containing values at each timestep, your input array "x" should contain the times that you want to plot the timeseries against. A typical example of using gsn_csm_xy on an annual timeseries that runs from 1900-2017:</div><div>plot = gsn_csm_xy(wks,ispan(1900,2017,1),tseries,res)</div><div><br></div><div>Hope that helps. If you have any further questions please let the ncl-talk email list know.</div><div>Adam</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-6972833525739972428gmail_attr">On Thu, Jan 17, 2019 at 8:03 AM Amal Inge <<a href="mailto:amalingenieur89@gmail.com" target="_blank">amalingenieur89@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">sorry, this is the error:<div><div>fatal:CheckArray:Each vector in the caXArray array must have at least 2 elements</div><div>fatal:CoordArraysInitialize:caXArray resource is invalid</div><div>fatal:Unable to initialize layer-Can't Create</div><div>fatal:Unable to access object with id:-4</div><div>fatal:PID #-4 can't be found in NhlSetValues</div><div>fatal:Unable to access object with id:-4</div><div>warning:Unable to add DataItem "(null)" to DataList "xyCoordData"</div><div>fatal:CompileDataList:DataList has no valid members</div><div>fatal:Unable to access object with id:-4</div><div>warning:Unable to add DataItem "(null)" to DataList "xyCoordData"</div><div>fatal:CompileDataList:DataList has no valid members</div><div>fatal:Argument type mismatch on argument (0) of (attsetvalues_check) can not coerce</div><div>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 12478 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl</div><div><br></div><div>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 5083 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl</div><div><br></div><div>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 66 in file dox-landing-xy.ncl</div></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-6972833525739972428gmail-m_6732594838883601991gmail_attr">Le jeu. 17 janv. 2019 à 13:37, Amal Inge <<a href="mailto:amalingenieur89@gmail.com" target="_blank">amalingenieur89@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear NCL experts,<div><br></div><div>I tried this script attached to make a scatter plot with 3 y axis, then I had this error and i did not find my mistake. </div><div>Could you help me please.</div><div>I checked the script scatter_4.ncl to make a 2 regresseion line (one between all dox data and y2 and the second with y3) but i did not understand how to deal with this, it would be nice if you can tell me how.</div><div>exemple of variable:</div><div><div>Variable: y_a1</div><div>Type: float</div><div>Total Size: 4 bytes</div><div> 1 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre-wrap"> </span>[time | 1]</div><div>Coordinates: </div><div> time: [1402876800..1402876800]</div><div>Number Of Attributes: 7</div><div> _FillValue :<span style="white-space:pre-wrap"> </span>1e+20</div><div> standard_name :<span style="white-space:pre-wrap"> </span>mole_concentration_of_dissolved_molecular_oxygen_in_sea_water</div><div> long_name :<span style="white-space:pre-wrap"> </span>Mole concentration of Dissolved Molecular Oxygen in sea water</div><div> units :<span style="white-space:pre-wrap"> </span>millimol m-3</div><div> _ChunkSizes :<span style="white-space:pre-wrap"> </span>( 1, 22, 84, 161 )</div><div> average_op_ncl :<span style="white-space:pre-wrap"> </span>dim_avg_n over dimension(s): lat,lon</div><div> missing_value :<span style="white-space:pre-wrap"> </span>1e+20</div></div><div><br></div><div>many thanks</div><div>best regards</div><div>amal</div></div></div></div>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-6972833525739972428gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>