[ncl-talk] duplicating a graphic plot, and disassociate from original.
David Brown
dbrown at ucar.edu
Thu Oct 9 16:46:07 MDT 2014
No I don't think there is any means of copying a plot object
currently. Note that a copy would need to make copies of each of the
building block objects that a plot object is composed of; e.g. new
text objects for each piece of text. I am not sure that it would be
much more efficient than just creating a new plot object as per your
workaround.
-dave
On Thu, Oct 9, 2014 at 4:23 PM, Mary Haley <haley at ucar.edu> wrote:
> 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
>>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
More information about the ncl-talk
mailing list