change the graph from vertical to horizontal

12 ビュー (過去 30 日間)
Bob
Bob 2019 年 3 月 25 日
コメント済み: Bob 2019 年 3 月 25 日
Hi,
I want to change my vertical plot to horizontal. tried legend of graph didnt woked:
for i=1:length(A)-300
C= corrcoef(A (i:i+300), B(i:i+300))
fprintf('The correlation Coefficient: %d\n',C)
plot (rand(C,'.')); hold on
legend({C,'.'},'Orientation','horizontal');
Any help would be appriciable.
  3 件のコメント
Jan
Jan 2019 年 3 月 25 日
The purpose of the code is not clear. "Changing the graph to horizontal" is not a unqiue explanation also. Neither rand(C,'.') nor the occurrence of {C,'.'} inside the legend command are useful, as far as I can see. What do you expect as result of setting the orientation of the legend?
Bob
Bob 2019 年 3 月 25 日
I am expectin to get the horizontal plot instea of automated verticle graph. I have red many placs to use legend, so I did but havent achived, what I wanted.

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

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 3 月 25 日
編集済み: madhan ravi 2019 年 3 月 25 日
As you did not provide A and B datas, you can do it in number of ways, which is suitable, please look on it.
I have shown the following code, you can do the replication easily-
x=1:.1:10;
y=exp(x);
subplot(131); plot(x,y);
subplot(132); plot(y,x);
subplot(133),plot(x,y);
camroll(90)

その他の回答 (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