Converting 3D scatter plot into 2D plot?

4 views (last 30 days)
Ilkin Abdullayev
Ilkin Abdullayev on 27 Apr 2020
Commented: Walter Roberson on 27 Apr 2020
Hello everybody,
I have a data include 10 column and more than 400000 row. I plot scatter3(x,y,z) to get 3D plot. Here x is the coordinate,y is the coordinate,z is the colour.
the function which i use to get x and y is:
x = sin(data.angle) .* data.Id
y = cos(data.angle) .* data.Id
z= data.load;
Now I want to convert my 3D plot into 2D without losing too much data. My 3D plot is kind of 4 pipe with different diameters and load (z) value is the colour is different in a each point of pipe. It is a bit difficult to explain, but hopefully you understood. If there is any suggestion to convert from 3D to 2D, i would be glad to hear.
  2 Comments
Rik
Rik on 27 Apr 2020
What do you mean with losing data?
Do you want to interpolate to a grid in x and y and use z as color?
It would be really helpful if you would provide data or code to generate plausible data.
Walter Roberson
Walter Roberson on 27 Apr 2020
If z is the color then you can
scatter(x, y, POINTSIZE, z)

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!