what is the 'ro' in plot() mean?

531 ビュー (過去 30 日間)
Binzi Shu
Binzi Shu 2016 年 5 月 6 日
コメント済み: Stephen23 2016 年 5 月 6 日
I saw this:
plot(x,y,'ro')
I checked the doc but didn't find it. What does 'ro' mean? Thanks.
  1 件のコメント
Stephen23
Stephen23 2016 年 5 月 6 日

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

回答 (1 件)

John D'Errico
John D'Errico 2016 年 5 月 6 日
READ THE HELP! The important part is here:
Various line types, plot symbols and colors may be obtained with
plot(X,Y,S) where S is a character string made from one element
from any or all the following 3 columns:
b blue . point - solid
g green o circle : dotted
r red x x-mark -. dashdot
c cyan + plus -- dashed
m magenta * star (none) no line
y yellow s square
k black d diamond
w white v triangle (down)
^ triangle (up)
< triangle (left)
> triangle (right)
p pentagram
h hexagram
r and o are both listed as doing something independent of each other.
  2 件のコメント
Binzi Shu
Binzi Shu 2016 年 5 月 6 日
So I can combine them, like "go", "b." etc?
Image Analyst
Image Analyst 2016 年 5 月 6 日
Yes, you can string together one from each column in a single quoted string. You can leave one or two out if you want, so you can have up to three (or 4) characters in the string, like 'ro-', 'ro', 'b--', 'mx-.', etc.

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

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by