フィルターのクリア

How to display X-tick labels vertically using GPLOT?

1 回表示 (過去 30 日間)
Vitaly
Vitaly 2013 年 4 月 18 日
Hi, here is the code I'm using:
gplot(adj,NC,'-o')
axis([0 W1 0 H1])
xlabel('Width')
ylabel('Height')
title('MESH GRID (in global coordinates)')
set(gca,'XTick',0:w:W1)
set(gca,'YTick',0:h:H1)
'adj' is the adjacency matrix and 'NC' is the matrix of nodes' coordinates. The thing is when the amount of nodes is quite large, tick labels on the x-axis nearly collide and so I want them to be displayed vertically. I know how to use 'XTicksLabelStyle = Vertical' within the 'plot' function, but 'gplot' does not seem to be supporting that parameter. So how should I do that using 'gplot'?
  1 件のコメント
Vitaly
Vitaly 2013 年 4 月 18 日
anyone?? I'm sure there's got to be a way

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

採用された回答

Daniell Algar
Daniell Algar 2013 年 4 月 18 日
Not sure if this solution fit your data - but if you know how to set the 'XTicksLabelStyle' within the plot function, why not do
[x, y]= gplot(adj,NC,'-o');
plot(x, y)
and set the ticks.
  3 件のコメント
Daniell Algar
Daniell Algar 2013 年 4 月 19 日
I see.. I honestly didn't know what you where talking about with the 'XTicksLabelStyle' :-). But if that's the case, I can aid you further by recommending the following File Exchange submission.
Good luck!
Vitaly
Vitaly 2013 年 4 月 19 日
thanks, that script works, but I just realized it's too huge for such a tiny operation..

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by