Borrar filtros
Borrar filtros

Plotting nodes and values

4 visualizaciones (últimos 30 días)
Nazar Adamchuk
Nazar Adamchuk el 31 de Oct. de 2021
Respondida: Walter Roberson el 31 de Oct. de 2021
I am plotting the nodes (>150,000) havíng x,y,z-coordinates with help of
scatter3(coor_vs_difference.x_coor,coor_vs_difference.y_coor,coor_vs_difference.z_coor, '.');
receiving:
Now I'd like to add some associated values at each node, for example, the values from the variable "deltaCycLimit". Each of the data point should receive now some color value for the colorbar. The values in the variable "deltaCycLimit" would vary accroding to the following colorbar from -1066670 (darkblue) to 1195724 (yellow):
How I can represent on my scatter3 plot all nodes, colored from the colorbar according to values?

Respuesta aceptada

Walter Roberson
Walter Roberson el 31 de Oct. de 2021
The scatter3() syntax is
scatter3(x, y, z, SIZE, COLOR, LINESPEC)
SIZE can be a scalar, or can have one entry for each x value, or can be [] to use default size.
COLOR can be a scalar, or can be a 1 x 3 vector of RGB, or can be a N x 1 vector where N is the number of entries in x, or can be an N x 3 array where N is the number of entries in x.
In your case you would probably use deltaCycLimit or deltaCycLimit(:) for your COLOR information.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by