How to move the origin of the Y axis
75 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Can you some one help me find out how to move the Y axis to the 0 origin
0 Commenti
Risposte (1)
Image Analyst
il 3 Dic 2019
Use the XAxisLocation and/or the YAxisLocation properties of the axes. Try this:
x = rand(1, 20) - 0.5;
y = rand(1, 20) - 0.5;
plot(x, y, 'b.', 'MarkerSize', 30, 'LineWidth', 2);
grid on;
% Move axes to origin.
ax = gca; % Get handles to axis.
ax.YAxisLocation = 'origin';
ax.XAxisLocation = 'origin';
0 Commenti
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!