hi can you help me to change the display of the plot

1 回表示 (過去 30 日間)
manel maatouk
manel maatouk 2018 年 5 月 4 日
回答済み: Yuvaraj Venkataswamy 2018 年 5 月 4 日
hi
can you help me to change the display of the plot to have as unit the pixel and the axis of X and Y use the same
unit. I use the matlab R2014a and I typed this code but I did not get the right result
ax = gca
set(ax, 'XAxisLocation', 'top', ...
'YAxisLocation', 'left', ...
'XDir', 'normal', ...
'ZDir', 'reverse', ...
'DataAspectRatio', [1 1 1], ...
'PlotBoxAspectRatio', [1 1 1], ...
'PlotBoxAspectRatioMode', 'manual', ...
'Position', [0 0 1 1], ...
'ActivePositionProperty', 'position');
figure
x=[1:10]
y=[1:10]
plot(x,0.375 *x)

回答 (1 件)

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy 2018 年 5 月 4 日
if true
% code
xlim([0 10]);
ylim([0 4]);
end

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by