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

7 vues (au cours des 30 derniers jours)
N/A
N/A le 28 Juin 2018
Commenté : N/A le 1 Juil 2018
for x=0:pi/180:pi
y=sin(x);
end
plot(x,y,'g-..','LineWidth',5);
このようなプログラムを書きましたが、二点鎖線ではなく一点鎖線になりました。どのように修正すれば書けますか?

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!