How i can map data axis (x,y) ->(10x10) area to a large (100x100) area?

1 回表示 (過去 30 日間)
Arsal15
Arsal15 2016 年 1 月 25 日
編集済み: Stephen23 2016 年 1 月 27 日
I have a data set in the range of (x[0 10], y[0 10]) so i want to plot this data in the area of 100x100 so that It can give a larger view of the data set. I want to expand this with respect to data ? how i can do this ? Need your guidance.

回答 (1 件)

Stephen23
Stephen23 2016 年 1 月 25 日
編集済み: Stephen23 2016 年 1 月 27 日
You don't need to change your data, just change the axes limits to zoom into the data that you want to see. Try something like this:
xlim([0,10])
ylim([0,10])
There are plenty of options, so read the documentation too:
EDIT: multiply the data by 10. This seems to be what the OP is wanting to do.
  5 件のコメント
Arsal15
Arsal15 2016 年 1 月 26 日
@Stephen Cobeldick, Well "limiting my plot to this axis mean i have my data in [0 10] in both axis but I want it should give me a view in [0 100] in both axis. Well the setting of limits work but it is plotting my graph in [0 10] range in both axis. But i want to expand it to [0 100] area in both axis.
if true
colorstring = 'mbybgkkcrr';
figure;
hold on;
for nodeIndex = 1:numNodes
plot( nodep(nodeIndex).x(1:end), nodep(nodeIndex).y(1:end),'*',
'color',colorstring(nodeIndex));
text(nodep(nodeIndex).x(1), nodep(nodeIndex). y(1), 'SP','Color','r' ,'FontSize',20);
text(nodep(nodeIndex).x(end),nodep(nodeIndex).y(end), 'EP','Color','r','FontSize',20);
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
xlim ([0 10]); ylim ([0 10]);
end
end
@Image Analyst It plot in so that the data in 0-10 range get the view of 0-100 range.
It will now take up the same real estate on my screen that the old 0-10 range did before. Is
that not the case?
Stephen23
Stephen23 2016 年 1 月 27 日
The obvious answer is to multiply your X and Y values by 10. But it still seems rather bizarre to prefer to change the data rather than simply zoom the axes.

サインインしてコメントする。

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by