フィルターのクリア

How to make coordinate axis

3 ビュー (過去 30 日間)
Highwayman2
Highwayman2 2015 年 5 月 4 日
回答済み: Highwayman2 2015 年 5 月 4 日
I have a plot with limits or -3 to 3 which is plotting the columns of a 100x2 matrix (xaxis for first column and y axis for the second column). I need to plot dotted gray lines on the coordinate axis, (x = 0 and y = 0). A bit confused
  2 件のコメント
Gopalkrishna Bhat
Gopalkrishna Bhat 2015 年 5 月 4 日
Do you want to plot with the first column in X-axis & second column in Y-axis ? Can you elaborate it ?
Highwayman2
Highwayman2 2015 年 5 月 4 日
i want to keep the plot the same, so first column x axis and 2nd column y axis. Just with a coordinate axis (x=0 and y=0) on the plot for reference

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

回答 (2 件)

Highwayman2
Highwayman2 2015 年 5 月 4 日
thank you, i already had that plot to begin with though. the part i dont know about is how to plot the x = 0 axis and y = 0 axis on the same graph

Gopalkrishna Bhat
Gopalkrishna Bhat 2015 年 5 月 4 日
編集済み: Gopalkrishna Bhat 2015 年 5 月 4 日
Hi Peter,
Assuming a matrix A of size 100x2 with random elements, I have provided the code for plotting the first column as the X-axis & second column as the Y-axis. You can replace the first command with your matrix .
a = rand(100,2);
x1 = a(:,1);
y1 = a(:,2);
plot(x1,y1)

カテゴリ

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