plotを用いた二点鎖線の書き方

7 visualizzazioni (ultimi 30 giorni)
N/A
N/A il 28 Giu 2018
Commentato: N/A il 1 Lug 2018
for x=0:pi/180:pi
y=sin(x);
end
plot(x,y,'g-..','LineWidth',5);
このようなプログラムを書きましたが、二点鎖線ではなく一点鎖線になりました。どのように修正すれば書けますか?

Risposta accettata

Ma
Ma il 28 Giu 2018
plot関数によると、2重鎖線はサポートされていないようです。
無理やり二点鎖線に見えるものを作ろうとすると、
x=0:pi/180:pi;
y=sin(x);
plot(x,y,'g--.','LineWidth',5);
(※図が1点になってたのでループをなくしました)とすると、破線と点が描けます。あとは画像の大きさを調整することで破線の間に見える点の数を2つにし、見かけ上は二点鎖線にすることができます。
  1 Commento
N/A
N/A il 1 Lug 2018
ありがとうございました。

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!