how can I plot this figures
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Abdelkader Hd
el 7 de Ag. de 2022
Comentada: Abdelkader Hd
el 8 de Ag. de 2022
Hi community,
Please I need your help to plot the figures like in the picture below.
Thanks![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1090610/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1090610/image.jpeg)
2 comentarios
Sam Chak
el 7 de Ag. de 2022
@Abdelkader Hd, these plots require either some maths or the data point needed to create them. Can you provide the data as labeled in the x- and y-axes?
Respuesta aceptada
M.B
el 8 de Ag. de 2022
Try the function contourf:
x = linspace(-2*pi,2*pi);
y = linspace(0,4*pi);
[X,Y] = meshgrid(x,y);
Z = sin(X) + cos(Y);
figure(101);
contourf(X,Y,Z,100, 'edgecolor','none');
colormap hot; % use colormapeditor for a customised colormap
Más respuestas (1)
Walter Roberson
el 8 de Ag. de 2022
https://www.mathworks.com/help/matlab/ref/histcounts2.html can be used to calculate the counts for density plot purposes. imagesc() with the appropriate colormap and colorbar(). Use tiledlayout to arrange the plots.
Ver también
Categorías
Más información sobre Colormaps 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!