How do I make ZOOM in 2D graphics to detail specific areas?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Greetings in these situations (SEE 2D GRAPHICS IN THE IMAGE) I would like to apply a ZOOM to see in more detail a zone of the graph, that is to say a ZOOM separately inside the graph, could you help me with that doubt? I do not know how to do it. if they can observe, they will realize that within the black line there are 4 lines of graphics and i want to see that area in detail.
%-----------definition of variables--------------
function[] = GraficosIndices2D_M45_50(A_M45_50_pitch, B_M45_50_pitch, C_M45_50_pitch, D_M45_50_pitch, A_M45_50_IestPitch, B_M45_50_IestPitch, C_M45_50_IestPitch, D_M45_50_IestPitch, A_M45_50_IdirPitch, B_M45_50_IdirPitch, C_M45_50_IdirPitch, D_M45_50_IdirPitch, R_Iest, R_IestRoll, R_IestPitch, R_Idir, R_IdirPitch, R_IdirRoll, R_pitch, R_roll)
[X1,Y1]= meshgrid(R_pitch,R_roll);
%--------3D GRAFICS------------------------------ figure
%----------GRAFIC 3D 1----------
subplot (2,2,1);
surf(X1,Y1,R_Iest);
%axis([-30 30 -30 30 0.5 1])
set(gca,'Ydir','reverse')
set(gca,'Xdir','reverse')
ylabel ('Roll (°)');
xlabel ('Pitch (°)');
zlabel ('I_e_s_t');
title ('Rígido');
%----------GRAFIC 3D 2----------
subplot (2,2,3);
surf(X1,Y1,R_Idir);
%axis([-30 30 -30 30 0.5 1])
set(gca,'Ydir','reverse')
set(gca,'Xdir','reverse') xlim auto
ylim auto ylabel ('Roll (°)');
xlabel ('Pitch (°)'); zlabel ('I_d_i_r');
title ('Rígido');
%--------2D GRAFICS------------------------------
%----------GRAFIC 2D 1----------
subplot (2,2,2);
plot (A_M45_50_pitch,A_M45_50_IestPitch,'linewidth',2);
hold on
plot (B_M45_50_pitch,B_M45_50_IestPitch,'r','linewidth',2);
hold on
plot (C_M45_50_pitch,C_M45_50_IestPitch,'g','linewidth',2);
hold on
plot (D_M45_50_pitch,D_M45_50_IestPitch,'k','linewidth',2);
hold on
plot (R_pitch,R_IestPitch,'Color',[0.9290, 0.6940, 0.1250],'linewidth',2);
%axis([15 19 0.75 0.85]);
axis([15 19 0.59 0.85]);
ylabel ('I_e_s_t');
xlabel ('Pitch (°)');
title ('I_e_s_t para F_5_z = 50N, \theta_1 = -45°, Roll = 0º y k_w = 3017.15 N/mm');
grid on
legend ('K_s=10','K_s=19','K_s=39.07','K_s=55','Rígido');
%----------GRAFIC 2D 2----------
subplot (2,2,4);
plot (A_M45_50_pitch,A_M45_50_IdirPitch,'linewidth',2);
hold on
plot (B_M45_50_pitch,B_M45_50_IdirPitch,'r','linewidth',2);
hold on
plot (C_M45_50_pitch,C_M45_50_IdirPitch,'g','linewidth',2);
hold on
plot (D_M45_50_pitch,D_M45_50_IdirPitch,'k','linewidth',2);
hold on
plot (R_pitch,R_IdirPitch,'Color',[0.9290, 0.6940, 0.1250],'linewidth',2);
%axis([15 19 0.81 0.84]);
axis([15 19 0.59 0.85]);
ylabel ('I_d_i_r');
xlabel ('Pitch (°)');
title ('I_d_i_r para F_5_z = 50N, \theta_1 = -45°, Roll = 0º y k_w = 3017.15 N/mm');
grid on
legend ('K_s=10','K_s=19','K_s=39.07','K_s=55','Rígido');
end
0 Kommentare
Antworten (1)
Adam Danz
am 26 Sep. 2018
Option 1: manually Use your mouse to zoom into parts of your plot.
Option 2: programmatically by setting the xlim() ylim() to the desired ranges.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Data Exploration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!