Matplotlib imshow: Data rotated?

前端 未结 4 1194
清酒与你
清酒与你 2021-02-07 02:21

I was trying to plot some data with scatter. My code is

import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
from scipy.interpolate import         


        
4条回答
  •  北海茫月
    2021-02-07 02:36

    Look at the keyword arguments of imshow. There is origin. The default is "upper", but you want "lower".

    The default makes sense for plotting images, that usually start at the top-left corner. For most matrix-plotting, you'll want origin="lower"

提交回复
热议问题