Assigning a 3D scatter plot to structure array
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
Is it possible to assign scatter plots in a structure array which can then be recalled individually?
I currently have the following line:
cell_data(i).visual = scatter3(a(:,1), a(:,2), a(:,3),50, 'fill')
However if I try to recall any individual plot I just receive a number...
Kind regards,
Tom
3 comentarios
per isakson
el 18 de Feb. de 2014
Editada: per isakson
el 18 de Feb. de 2014
You assign values to cell_data(i).positions in your code? Is it the values of a?
"call up the 3D scatter plot". Do you mean make the plot visible; bring it to the top?
Respuestas (1)
per isakson
el 18 de Feb. de 2014
Try this with the [Run and Advance] button
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174361/image.png)
jj = 1;
a = magic( 3 );
figure
cell_data(jj).visual = scatter3(a(:,1), a(:,2), a(:,3), 50, 'fill');
jj = 2;
a = randi( 6, [3,3] );
figure % create new figure; avoid overwriting
cell_data(jj).visual = scatter3(a(:,1), a(:,2), a(:,3), 50, 'fill');
get( cell_data(jj).visual, 'Type' )
fh = ancestor( cell_data(jj).visual, 'figure' );
figure( fh )
0 comentarios
Ver también
Categorías
Más información sobre Scatter Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!