How can I update the histogram plot using LINKDATA function in MATLAB 7.8 (R2009a)?
Mostrar comentarios más antiguos
I generate two histogram plots that I would like to link to the data in my workspace:
x = -4:0.1:4;
y = randn(1000,2);
figure
subplot(2,1,1)
hist(y(:,1),x)
subplot(2,1,2)
hist(y(:,2),x)
I try to use LINKDATA but it does not link the data correctly because the data plotted on the histograms is part of a matrix.
linkdata on
y = randn(1000,2);
When I was using the PLOT command I was able to specify the 'YDataSource' of the plot and that would specify the data linking:
figure
plot(y(:,1),'YdataSource','y(:,1)')
linkdata on
y = randn(1000,2);
However, I cannot use the same approach for my problem because the histogram object does not seem to have the 'YDataSource' property. I would like to use the LINKDATA function and not the Data Linking tool in the figure toolbar.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!