フィルターのクリア

Grid with different distances in the axes

1 回表示 (過去 30 日間)
Tamia Eli
Tamia Eli 2020 年 7 月 18 日
編集済み: Rachel Surridge 2020 年 7 月 18 日
Hello, I want to program a grid in Matlab with different distances in the axes, I have only found information to make equidistant lines, but I don't want that, I want the result to be like this image that i take from AutoCAD, could you help me.The distances are different since it is a cartographic projection, I have as data the corners of the grid in degrees minutes and seconds, so I calculate de coordinates where the lines should be draw.

採用された回答

Rachel Surridge
Rachel Surridge 2020 年 7 月 18 日
編集済み: Rachel Surridge 2020 年 7 月 18 日
Hello!
In MATLAB plots, the grid lines fall where the ticks are on the axes.
You can provide custom locations for x and y ticks using code like this:
figure();
plot(1:10);
xticks([1.543 3.543 6.887, 8.5324]);
yticks([1.354 4.654 7.432 9.432]);
grid on;
Then when you turn on the grid, the grid lines will be drawn on the x and y locations you specified.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by