フィルターのクリア

line doesnt appear on my graph

2 ビュー (過去 30 日間)
Austin
Austin 2013 年 10 月 4 日
回答済み: Image Analyst 2013 年 10 月 4 日
hi,im trying to plot a graph below is my script and outcome of my plot(x,y) graph. can anyone enlighten me on why do i only get scatter points and not a line graph?
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 4 日
Please don't post a code as an image, we can not test it
Austin
Austin 2013 年 10 月 4 日
Noted.

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 4 日
編集済み: Azzi Abdelmalek 2013 年 10 月 4 日
x=-10:10
y=log(abs(x-27))./(x.^2+83)
plot(x,y)
% you have missed a . /
  1 件のコメント
Austin
Austin 2013 年 10 月 4 日
it works,thanks lots!!

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2013 年 10 月 4 日
Of course you need a dot like Azzi said. FYI, see this code to see how to adjust the line and markers:
x = 1:10;
y = sin(x);
% b means blue, o means small circle, - means solid line.
plot(x, y, 'bo-', ...
'LineWidth', 4, 'MarkerSize', 20, ...
'MarkerFaceColor', 'r', 'MarkerEdgeColor', [.5, .9, .7]);
You should now be able to get lines between the markers and adjust the way the markers look. Hope this helps. See the help for LineSeries or plot for more options.

カテゴリ

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