<div dir="ltr"><div class="gmail_default" style="font-size:small">Anahita,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You are calling gsn_csm_xy2 two times with the exact same arguments, so it doesn't surprise me that you have two identical plots:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,<wbr>resR) ; create plot</span></font></div><div style="color:rgb(80,0,80);font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,<wbr>resR) </span></font></div><br></div><div class="gmail_default" style="font-size:small">This function is explicitly for allowing you to plot two Y curves that have different axes, but share the same X data, so one call is all you need:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial"><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,<wbr>resR) ; create plot</span></font></div><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial">If the plot that you're getting is not what you expected, then email ncl-talk again and provide more detail on what you want.</div><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial">Thanks,</div><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:12.8px;color:rgb(80,0,80);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="text-decoration-style:initial;text-decoration-color:initial"><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">--Mary</span></font></div><div style="text-decoration-style:initial;text-decoration-color:initial"><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 13, 2018 at 12:38 PM, Anahita Amiri Farahani <span dir="ltr"><<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Dear All, <div><br></div><div>I used <span style="background-color:rgb(255,255,255)"><a href="https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_xy2.shtml" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;margin:0px;padding:0px;text-decoration-line:none;color:rgb(133,45,133);font-family:verdana,sans-serif;font-size:13.3333px" target="_blank"><strong style="margin:0px;padding:0px">gsn_csm_xy2</strong></a><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"> to draw two lines each with their own separate Y-axis, but it gives me two identecal plots. Here is the code and Attached is the plot:</span></span></div><span class=""><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"><br></span></span></div><div><span style="background-color:rgb(255,255,255)"><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">;*****************************<wbr>*******************</span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">wks = gsn_open_wks ("eps","time_vs_alt") ; send graphics to PNG file</span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">resL = True ; plot mods desired</span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">resL@tiMainString = "Altitide vs. Time" ; add title</span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">resR = True </span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">resR@xyLineColors = "blue" ; line color</span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,<wbr>resR) ; create plot</span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,<wbr>resR) </span></font></div><div><font color="#333333" face="verdana, sans-serif"><span style="font-size:13.3333px">delete(wks)</span></font></div><div style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"><br></div><div style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"><br></div><div style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"><br></div><div style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px">Thanks,</div><div style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px">Ana</div></span></div></span></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>