<div dir="ltr"><div dir="ltr"><div>Here is an alternate approach that would split up the time-consuming data preparation into manageable chunks.  It seems like you need something like this.  Split up your existing program into two separate programs.  One program would do data preparation only, and the other program would only do plot generation.  In between would be a set of Netcdf intermediate files, one for each of your individual scatter plots.</div><div><br></div><div>Each Netcdf file would contain the necessary X/Y information to make one complete scatter plot.  For example, you now have:</div><div><br></div><div>    plot1 = gsn_csm_xy(wks,prec_wk,wrf_prec_wks,res)</div><div><br></div><div>So you could calculate the two arrays prec_wk and wrf_prec_wks and save them to a Netcdf file.  I recommend a separate Netcdf file with a unique file name, for each of your data scenarios (weeks, years, site locations, whatever).  You can also include supplemental information such as labels, as attributes or extra file variables.  This way, you can independently develop and update each data scenario.</div><div><br></div><div>Once all of the incoming information is digested into several X/Y sets, NCL is fast and efficient when generating multiple scatter plots as overlays.  NCL does not have the ability to read back finished graphics products like PDF and PNG, but it can easily work with the raw numeric data that is the final stage before making a set of plot overlay layers.</div><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 9, 2019 at 2:56 PM Adam Phillips via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.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"><div dir="ltr">Hi Zack,<div>If I understand your questions correctly, you'd like to be able to look at the intermediate overlays before the final overlay is done, correct? If so I don't think you can do this totally within NCL. You can however use Image Magick and the composite command to combine images outside of NCL, which you can write into your script. You would want to write out each scatterplot as it's own image, and overlay them using the composite command. That would allow you to look at the scatterplots as they get created. You can even leave the existing coding intact for the plots, and create a 2nd set of plotting calls for each plot that will be used by Image Magick.</div><div><a href="https://imagemagick.org/script/composite.php" target="_blank">https://imagemagick.org/script/composite.php</a></div><div>Perhaps others will have a better idea, but this is the only option that I see.</div><div>Adam</div><div> <br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 9, 2019 at 12:15 PM Zach Rieck via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.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">To whom it May Concern-<div><br></div><div>I have several scatter plots that I want to combine into 1. My codes for each source file are comprehensive and take a while to compile (~10 min). I could create a master code and overlay everything, but I don't want to be waiting an hour for the plot to generate.</div><div><br></div><div>What I'd like to do is modify my code to open the scatter plot and overlay the plots on top of each other into one. This seems like something that should be relatively straightforward to do, but I can't find any examples that guide me through the syntax. </div><div><br></div><div>If code is helpful, I have it attached, but generally trying to frame this as a conceptual question. If you can show how to merge any PDF plots (or png if necessary) I can figure the rest out.</div><div><br></div><div>Thanks for the help!</div><div><br></div><div>Respectfully,<br clear="all"><div><div dir="ltr" class="gmail-m_7783770160106002726gmail-m_-1188678600851246350gmail_signature"><div dir="ltr">-Zach Rieck</div></div></div></div></div></blockquote></div></blockquote></div></div>