質問するログイン新規登録

回答編集履歴

1

再投稿

2017/05/13 04:50

投稿

Tomeko
Tomeko

スコア12

answer CHANGED
@@ -1,7 +1,7 @@
1
1
  斜体のフォントを細かく指定する方法はわかりませんでしたが,
2
2
  plt.rcParams["mathtext.fontset"] = "stixsans"
3
3
  と設定すれば,フォントがstixのsans-serifとなり,グラフの体裁が整うかと思います.
4
- ![イメージ説明](6756fb1c18a5d6f369085d29faae0961.png)
4
+ ![イメージ説明](a5bd039fc07892f6185943cced79bd34.png)
5
5
  ```python
6
6
  import matplotlib.pylab as plt
7
7
  import math
@@ -23,8 +23,8 @@
23
23
 
24
24
  plt.plot(x,y)
25
25
 
26
- plt.xlabel("Angle "+"$\phi$ "+"[$\mathrm{\degree}$]", fontsize=20) # x軸のタイトル
26
+ plt.xlabel("Angle "+"$\phi$ "+"[$\mathregular{\degree}$]", fontsize=20) # x軸のタイトル
27
- plt.ylabel("Probability $P$"+"$\mathrm{_{SW}}$", fontsize=20) # y軸
27
+ plt.ylabel("Probability $P$"+"$\mathregular{_{SW}}$", fontsize=20) # y軸
28
28
 
29
29
  fig.savefig("task.png")
30
30
  ```