LoginSignup
0
0

More than 3 years have passed since last update.

Scilab (NumPy) - plotの書き方

Last updated at Posted at 2019-06-30

自分用のメモです。

プロット

SciLab(plot) (NumPy) (R)
プロット
(散布図)
x={0,0.1,...}
y=sin(x)
x=[0:0.1:6];
y=sin(x);
plot(x,y)
plt.plot(x,y,label="sin")
軸範囲 0<=x<=6
-1<=y<=1
a=gca();//軸ハンドル取得
a.data_bounds=[0,-1;6,1];//X,Y共に設定
a.data_bounds(:,1)=[0,6];//X軸を設定
a.data_bounds(:,2)=[-1,1];//Y軸を設定
a.tight_limits(1)="on";//X軸を厳密に設定
a.sub_tics(1)=8;//x軸の目盛
タイトル "ABC" title("ABC","X軸","Y軸");//軸も指定 plt.title="ABC"
x軸ラベル "X" xtitle="X" plt.xlabel="X"
凡例 legends(["A","B","C"],1);//1右上、-1右上外 plt.legend()
表示 plt.show()
スタイル

線種類
ドット
brgcmykw
-,--,-.,:
+x*o.^v<>sdp

画像

SciLab NumPy R
画像読み込み #"IPCV"を使う場合
img=imread("filename")
from matplotlib.image import imread
img=imread()
画像表示 imshow(img) plt.imshow(img)
ピクセル値の取得 pixel=img(10,12,:);
2次元可視化 image(A,col=gray(0:16/16))

リンク
Scilab超入門(齊藤 宣一)
scilabつかいませんか(望月 孔二) 沼津高専
SciLab 勉強会(藤田研究室,小方研究室) 岩手県立大学

SciLab関連ドキュメントリンク

install
macOSでSciLabを動かすまで
SciNoteのオートコンプリートをとめたい

実践
SciLabでCSV読み込み
SciLabでGUIを使ってみる

Mac/Windows共用scilabスクリプト未公開
SciLabでフィルタを適用する未公開
プロットメモ未公開
プロットあれこれ未公開

他の言語と比較・書き換え
Scilab (NumPy) - plotの書き方
配列と文字列処理の比較
関数とオブジェクトの書き方メモ
Scilab,NumPy,R行列処理の比較

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0