how i can change my color of picture i want yellow one?

30 Ansichten (letzte 30 Tage)
salim saeed
salim saeed am 25 Okt. 2024 um 16:58
Bearbeitet: Piyush Kumar am 26 Okt. 2024 um 9:56
How i get this one can any one give me some idea or if have example form it will be so good ?
I already have this but i want other type of plot like above or even better if exist

Antworten (1)

Piyush Kumar
Piyush Kumar am 26 Okt. 2024 um 9:55
Bearbeitet: Piyush Kumar am 26 Okt. 2024 um 9:56
To plot a figure you have shared, you would need the function that is plotted. There is an inset plot in the figure too.
You can follow these steps -
  • Collect the x,y,z points
  • Use the surf function to create the 3D plot
  • Set colormap
  • Use "hold on" to add inset plot in the same figure
  • Add labels for the plot
  • Create inset plot
  • Set axis limit and aspect ratio
Suppose you want to plot ,
% Define x,y,z points
[x, y] = meshgrid(linspace(-20, 20, 100), linspace(-20, 20, 100));
z = sin(sqrt(x.^2 + y.^2)) ./ sqrt(x.^2 + y.^2);
% Create the 3D surface plot
figure;
surf(x, y, z, 'EdgeColor', 'none');
colormap(jet);
hold on;
% Add a plane
planeZ = zeros(size(x));
surf(x, y, planeZ, 'FaceColor', 'yellow', 'EdgeColor', 'none', 'FaceAlpha', 0.5);
% Set labels
xlabel('x');
ylabel('y');
zlabel('u(x,y)');
% Create inset plot
axes('Position', [0.7, 0.7, 0.2, 0.2]);
plot(x(1, :), z(50, :), 'k', 'LineWidth', 1.5);
xlabel('x');
ylabel('u(x)');
title('Inset');
% Adjust view
view(3);
axis tight;

Kategorien

Mehr zu Polar Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by