<div dir="ltr">Hi Carl,<div>To do this I don't believe there's a way around creating plot a twice. If a is to be used in two overlays you will need two separate instances of a for it to be properly overlaid.</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 9:54 AM Carl Schreck <<a href="mailto:cjschrec@ncsu.edu">cjschrec@ncsu.edu</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">Sorry for not being clear, that actually is what I want to do... Overlay a onto both b & c. The workaround I'm using now is to have my function return an array. Something like:<div><br></div><div><font face="monospace, monospace">a = new( 2, graphic )</font></div><div><div><font face="monospace, monospace">a(0) = gsn_csm_contour( wks, aData, res )</font></div><div><font face="monospace, monospace">a(1) = gsn_csm_contour( wks, aData, res )</font></div><div><font face="monospace, monospace">b = gsn_csm_contour( wks, bData, res )<br clear="all"></font><div><font face="monospace, monospace">c = gsn_csm_contour( wks, cData, res )</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">overlay( b, a(0) )</font></div><div><font face="monospace, monospace">overlay( c, a(1) )</font></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 10:35 AM James Russell <<a href="mailto:jorussel@ncsu.edu" target="_blank">jorussel@ncsu.edu</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><div dir="auto">Carl,</div></div><div dir="auto"><br></div><div dir="auto">I haven’t had a chance to check since I’m on my phone but I think that’s happening because you’ve got the overlay order reversed. The base plot should be the first index. The overlay should be the second. I think you should have:</div><div dir="auto"><br></div><div dir="auto">overlay(a,b)</div><div dir="auto">overlay(a,c)</div><div dir="auto"><br></div><div dir="auto">What I think you are doing is overlaying a onto b, and then trying to overlay a onto c. But a is already an overlay on b, hence why you are getting that error.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">James</div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 8:02 AM Carl Schreck <<a href="mailto:cjschrec@ncsu.edu" target="_blank">cjschrec@ncsu.edu</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">Is there any workaround to be able to overlay one plot onto two others? i.e.,<div><br></div><div><font face="monospace, monospace">a = gsn_csm_contour( wks, aData, res )</font></div><div><font face="monospace, monospace">b = gsn_csm_contour( wks, bData, res )<br clear="all"></font><div><font face="monospace, monospace">c = gsn_csm_contour( wks, cData, res )</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">overlay( b, a )</font></div><div><font face="monospace, monospace">overlay( c, a )</font></div><div><br></div><div>That gives the error:</div><div><font face="monospace, monospace">fatal:NhlAddOverlay: tranform is already an annotation or overlay: 30</font><br></div><div><br></div><div>I tried simply copying a:</div><div><span style="font-family:monospace,monospace">a = a2</span><br></div><div><span style="font-family:monospace,monospace">overlay( b, a )</span></div><div><div><font face="monospace, monospace">overlay( c, a2 )</font></div></div><div><br></div><div>But that gives the same error. I know it's not too difficult to call the plotting routine twice. But a lot of times I have graphics as return values from functions, so it'd be nice if there were some kind of copy_graphics function so I wouldn't have to run those again.</div><div><br></div><div>First world problems, but figured I'd ask... Thanks!</div><div>Carl</div><div><br></div>-- <br><div dir="ltr" class="gmail-m_-1441054771771296018gmail-m_7302494836521600911m_-6621095913153534708gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><table border="0" cellpadding="2" cellspacing="2" style="background-color:transparent;max-width:100%;border-collapse:collapse;color:rgb(51,51,51);font-size:14px;border:3px solid rgb(170,170,170);font-family:Times;line-height:12px"><tbody><tr><td align="center" height="71" width="71"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="https://ncics.org/" style="color:rgb(17,85,204)" target="_blank"><img src="https://ncics.org/ncics/img/NCICS_logo-131x131.png"></a></span></span></td><td valign="top"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Carl J. Schreck III, PhD</b><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Research Scholar</b></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://ncsu.edu/" style="color:rgb(38,58,143);font-weight:bold" target="_blank">North Carolina State University</a><br></span></span><a href="https://ncics.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">North Carolina Institute for Climate Studies (NCICS)</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">151 Patton Ave, Asheville, NC 28801<br>e: </span></span><a href="mailto:cjschrec@ncsu.edu" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">cjschrec@ncsu.edu</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">o: <a href="tel:(828)%20257-3140" value="+18282573140" style="color:rgb(17,85,204)" target="_blank">+1 828 257 3140</a><br></span></span><span style="font-family:arial,helvetica,sans-serif;font-size:11px">c: <a href="tel:(828)%20484-1702" value="+18284841702" style="color:rgb(17,85,204)" target="_blank">+1 828 484 1702</a><br></span><a href="http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">Publications</a><br><a href="https://ncics.org/mjo/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">ncics.org/mjo</a><br><a href="https://www.cyclonecenter.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">CycloneCenter.org</a><br></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></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></div>-- <br><div dir="ltr" class="gmail-m_-1441054771771296018gmail-m_7302494836521600911gmail_signature">This message was sent from my mobile device. Sorry for the brevity!<br><br><a href="http://go.ncsu.edu/james-russell" target="_blank">go.ncsu.edu/james-russell</a></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-1441054771771296018gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><table border="0" cellpadding="2" cellspacing="2" style="background-color:transparent;max-width:100%;border-collapse:collapse;color:rgb(51,51,51);font-size:14px;border:3px solid rgb(170,170,170);font-family:Times;line-height:12px"><tbody><tr><td align="center" height="71" width="71"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="https://ncics.org/" style="color:rgb(17,85,204)" target="_blank"><img src="https://ncics.org/ncics/img/NCICS_logo-131x131.png"></a></span></span></td><td valign="top"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Carl J. Schreck III, PhD</b><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Research Scholar</b></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://ncsu.edu/" style="color:rgb(38,58,143);font-weight:bold" target="_blank">North Carolina State University</a><br></span></span><a href="https://ncics.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">North Carolina Institute for Climate Studies (NCICS)</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">151 Patton Ave, Asheville, NC 28801<br>e: </span></span><a href="mailto:cjschrec@ncsu.edu" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">cjschrec@ncsu.edu</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">o: <a href="tel:(828)%20257-3140" value="+18282573140" style="color:rgb(17,85,204)" target="_blank">+1 828 257 3140</a><br></span></span><span style="font-family:arial,helvetica,sans-serif;font-size:11px">c: <a href="tel:(828)%20484-1702" value="+18284841702" style="color:rgb(17,85,204)" target="_blank">+1 828 484 1702</a><br></span><a href="http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">Publications</a><br><a href="https://ncics.org/mjo/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">ncics.org/mjo</a><br><a href="https://www.cyclonecenter.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">CycloneCenter.org</a><br></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></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_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>