質問編集履歴

3

質問文編集

2020/10/24 08:36

投稿

Kinsho
Kinsho

スコア18

test CHANGED
File without changes
test CHANGED
@@ -144,7 +144,99 @@
144
144
 
145
145
 
146
146
 
147
-
147
+ ### 失敗例2
148
+
149
+
150
+
151
+
152
+
153
+ ![イメージ説明](c68d8c12d884b35ea8230c8c0f4f838a.png)
154
+
155
+ ```Python
156
+
157
+ import seaborn as sns
158
+
159
+ import pandas as pd
160
+
161
+ import numpy as np
162
+
163
+ import matplotlib.pyplot as plt
164
+
165
+ import matplotlib.patches as patches
166
+
167
+
168
+
169
+ fig, axes = plt.subplots(2,3, figsize=(15,10), sharex=True, sharey=True)
170
+
171
+ data0= pd.read_csv('outputxy0.csv', index_col = 0)
172
+
173
+ data1= pd.read_csv('outputxy0.csv', index_col = 0)
174
+
175
+ data2= pd.read_csv('outputxy0.csv', index_col = 0)
176
+
177
+ data3= pd.read_csv('outputxy0.csv', index_col = 0)
178
+
179
+ data4= pd.read_csv('outputxy0.csv', index_col = 0)
180
+
181
+ data5= pd.read_csv('outputxy0.csv', index_col = 0)
182
+
183
+ sns.heatmap(data0, ax = axes[0,0], cmap = 'CMRmap_r');
184
+
185
+ axes[0,0].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=0(ns)')
186
+
187
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
188
+
189
+ axes[0,0].add_patch(c)
190
+
191
+ y = (plt.yticks()[0][0] + plt.yticks()[0][-1]) / 2
192
+
193
+ plt.axhline(y=y, linewidth=2, color="r")
194
+
195
+ sns.heatmap(data1, ax = axes[0,1], cmap = 'CMRmap_r');
196
+
197
+ axes[0,1].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=1(ns)')
198
+
199
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
200
+
201
+ axes[0,1].add_patch(c)
202
+
203
+ sns.heatmap(data2, ax = axes[0,2], cmap = 'CMRmap_r');
204
+
205
+ axes[0,2].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=2(ns)')
206
+
207
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
208
+
209
+ axes[0,2].add_patch(c)
210
+
211
+ y = (plt.yticks()[0][0] + plt.yticks()[0][-1]) / 2
212
+
213
+ plt.axhline(y=y, linewidth=2, color="r")
214
+
215
+ sns.heatmap(data3, ax = axes[1,0], cmap = 'CMRmap_r');
216
+
217
+ axes[1,0].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=3(ns)')
218
+
219
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
220
+
221
+ axes[1,0].add_patch(c)
222
+
223
+ sns.heatmap(data4, ax = axes[1,1], cmap = 'CMRmap_r');
224
+
225
+ axes[1,1].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=4(ns)')
226
+
227
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
228
+
229
+ axes[1,1].add_patch(c)
230
+
231
+ sns.heatmap(data5, ax = axes[1,2], cmap = 'CMRmap_r');
232
+
233
+ axes[1,2].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=5(ns)')
234
+
235
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
236
+
237
+ axes[1,2].add_patch(c)
238
+
239
+ ```
148
240
 
149
241
 
150
242
 

2

書式の更新

2020/10/24 08:36

投稿

Kinsho
Kinsho

スコア18

test CHANGED
File without changes
test CHANGED
@@ -118,6 +118,36 @@
118
118
 
119
119
  ②0を含む方法についてはそれらしき記事に到達さえできませんでした.
120
120
 
121
+
122
+
123
+
124
+
125
+ ### 失敗例
126
+
127
+
128
+
129
+ 添付コード途中を以下に変更
130
+
131
+ sns.heatmap(data1, ax = axes[0,1], cmap = 'CMRmap_r');
132
+
133
+ axes[0,1].set(xlabel = 'vx(10^6m/s)', ylabel = 'vy(10^6m/s)', title = 't=1(ns)')
134
+
135
+ c = patches.Circle(xy = (100, 100), radius = 50, ec = 'r', fill = False,linestyle='dashed')
136
+
137
+ axes[0,1].add_patch(c)
138
+
139
+ plt.plot([-10, 10], [0, 0])
140
+
141
+
142
+
143
+ 結果![イメージ説明](33c3a4d1f653acccc71c54cb7a481136.png)
144
+
145
+
146
+
147
+
148
+
149
+
150
+
121
151
  ### 補足情報(FW/ツールのバージョンなど)
122
152
 
123
153
 

1

再投稿

2020/10/24 04:26

投稿

Kinsho
Kinsho

スコア18

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  ②それぞれの軸の目盛りが0を含むように(例えば以下の図の場合,x軸の目盛りが-100,-89,...,-1,10,...となっており0が飛ばされていて困っています)したいです.
12
12
 
13
- 補助線をペイントツールなどで手動で添えるのはあまりに不細工なので方法を教えていたけますと幸です
13
+ 補助線をペイントツールなどで手動で添えるのはあまりに不格好なので方法を教えてい.
14
14
 
15
15
 
16
16