回答編集履歴
1
flip例を追記
answer
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
`invert_yaxis`でもできるようです。
|
2
2
|
参考:[Reverse Y-Axis in PyPlot](https://stackoverflow.com/questions/2051744/reverse-y-axis-in-pyplot)
|
3
3
|
|
4
|
+
画像を逆転せずに表示させたい場合は[numpy.flip](https://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.flip.html)で元データからひっくり返せばよいです。
|
5
|
+
|
4
6
|
```Python
|
7
|
+
im = np.flip(im,axis=0)
|
5
8
|
# 略
|
6
9
|
plt.subplot(1,2,1),plt.imshow(im,'gray')
|
7
10
|
plt.gca().invert_yaxis()
|
8
11
|
plt.title('output image')
|
9
|
-
```
|
12
|
+
```
|
13
|
+

|