|
On 8/1/2013 8:27 AM, Gwenywar wrote:
> Hello,
> I've plotted 2 histograms in one figure and I start with both having the
> same mean and SD, so they completely overlap.
> I then want to plot figure 2, where I increase the mean of 1 histogram
> by 50%.
>
> Is there a way I can tell matlab to plot the same as in figure 1 but
> with a different mean for one histogram without copy and paste all the
> commands from figure 1?
> So something like:
> figure2:
> recreate(figure1)
> now mean of Hist2 is 150
>
You can
a) save the previous commands to a script or function file and then be
able to recreate on demand. You can modify the function to alter the
data of any one or both as desired. Or,
b) if the first is still available, use copyobj to make a copy in a new
figure and modify it. You can get() the data and set() it modified by
the new mean or choose many other ways to make the modification.
But, yes, there is no function already existing that will do it all
automagically altho as noted you can make it reasonably painless (after
the first time, of course--you do have to do that work once).
|