Plotting 2D XY values as a 3D radial contour plot

5 visualizaciones (últimos 30 días)
Aero Descerazes
Aero Descerazes el 10 de En. de 2022
Comentada: Mathieu NOE el 13 de En. de 2022
I want to plot XY values, where X represents the values accross a radius (0 is the center of the distrbution) and Y represents the colors of a heatmap (like a Gaussian distribution). I want it to look like the image attached. Can anyone please tell me how to do this? Thanks!

Respuesta aceptada

Mathieu NOE
Mathieu NOE el 11 de En. de 2022
hello
my 2 cents suggestion
clc
clearvars
data = importdata('data.txt');
x = data.data(:,1);
n = 200;
r = linspace(min(x),max(x),n);
z = data.data(:,2);
zz = interp1(x,z,r);
figure, hold on
axis square
for ci = 1:200
theta = rand(n,1)*2*pi;
XX = r'.*cos(theta);
YY = r'.*sin(theta);
scatter(XX,YY,5,log10(zz),'filled')
end
% Color maps.
% parula - Blue-green-orange-yellow color map
% hsv - Hue-saturation-value color map.
% hot - Black-red-yellow-white color map.
% gray - Linear gray-scale color map.
% bone - Gray-scale with tinge of blue color map.
% copper - Linear copper-tone color map.
% pink - Pastel shades of pink color map.
% white - All white color map.
% flag - Alternating red, white, blue, and black color map.
% lines - Color map with the line colors.
% colorcube - Enhanced color-cube color map.
% vga - Windows colormap for 16 colors.
% jet - Variant of HSV.
% prism - Prism color map.
% cool - Shades of cyan and magenta color map.
% autumn - Shades of red and yellow color map.
% spring - Shades of magenta and yellow color map.
% winter - Shades of blue and green color map.
% summer - Shades of green and yellow color map.
colormap('autumn');
  7 comentarios
Aero Descerazes
Aero Descerazes el 13 de En. de 2022
@Mathieu NOE This is perfect! Thank you so much for your help!
Mathieu NOE
Mathieu NOE el 13 de En. de 2022
my pleasure !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Blue en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by