Data cursor showing color value
Mostrar comentarios más antiguos
Is there a way to get the data cursor to list the X,Y,Z coordinates and the value from the colorbar in a 3d scatter plot with the dots colored by a 4th column vector?
the default data cursor gives only X,Y,Z.
thanks Greg
Respuesta aceptada
Más respuestas (1)
Gregory McFadden
el 27 de Sept. de 2016
1 voto
1 comentario
Michael Abboud
el 27 de Sept. de 2016
If you are using a version of MATLAB such as R2014a or earlier, then graphics generally work a bit differently from newer releases. You can refer to the following link for more information about the graphics changes in MATLAB R2014b:
-
If your version of MATLAB is pre-R2014b, try replacing the terms such as “event_obj.Target.XData” with the following:
>> get( get(event_obj, 'Target'), 'XData')
And then replace the specific line:
>> value = event_obj.Target.CData(idx(1));
With the following:
>> CData = get( get(event_obj, 'Target'), 'CData');
>> value = CData(idx(1));
Also note that I am using an example from the "scatter3" documentation page to test my solution. Perhaps see if you can get it working with the 3rd example, "Vary Marker Color", and then generalize to your own code. You can find the "scatter3" documentation page below:
Categorías
Más información sobre Scatter Plots 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!