[ncl-talk] duplicating a graphic plot, and disassociate from original.

Mary Haley haley at ucar.edu
Thu Oct 9 16:23:50 MDT 2014


Alan,

Sorry about the delay in response.  I've been out of the office a lot.

As far as I know, there is no way to make a copy of a plot without calling
the function again.

When you do something like this:

  plot_a = plot
  plot_b = plot

You are effectively pointing plot_a and plot_b to the same plot, so any
changes to any one of these is changing all of them, because they are the
same plot.

Dave Brown may know if we have an internal function that allows you to copy
a plot object without having to generate it from scratch.

--Mary


On Fri, Oct 3, 2014 at 12:17 PM, Alan Brammer <abrammer at albany.edu> wrote:

> I came across an instance where I want to take a plot, duplicate it,
> change some settings in each of the new plot and draw both new plots.
>
> However all changes to duplicated objects change all the other objects.
> I'm not sure of the proper terminology so made a simple example attached
> below
>
> I make one plot, copy it, change the titles on the 2 new plots. Now all 3
> plots have the same title as the last one changed.  And if I try and panel
> the 3 plots, it gets confused as I guess they're all really just one plot
> with 3 different pointers.
>
> Is there a way to duplicate the plot not just create a new pointer to it.
> (without just running the plot line again, which is my current work
> around.).
>
>
>
> Thanks,
> Alan.
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141009/e437c3bf/attachment.html 


More information about the ncl-talk mailing list