set size square
または、その省略形で
set size sq
というコマンドを使えば正方形の中にグラフを描くことができる。
例
set size square
plot cos(x)
結果

雑記
投稿日:
set size square
または、その省略形で
set size sq
というコマンドを使えば正方形の中にグラフを描くことができる。
set size square
plot cos(x)

執筆者:seyanen
関連記事
次のページで書いてあることを参考にする。 http://gnuplot.sourceforge.net/docs_4.2/node162.html bottom=1, left=2, top=4, r …
axhline, axvline を使ってx,y軸に平行な線を描くことができる。 https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot …
文字に tex の記法を使って数式を入力することもできる。 例 import numpy as np from matplotlib import pyplot as plt x = np.linsp …
annotate を使う。 例 import numpy as np from matplotlib import pyplot as plt x = np.linspace(-10,10,100) …
python3 でクラス内からだけアクセスするメソッドを作る方法
1.メソッド内でメソッドを定義する2.メソッド最初にアンダースコアをつける(慣習)例: def _some_internal_func(self): … このうち、2.のメソッド名先頭にアンダース …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。