为什么Matplotlib会在没有被告知的情况下绘制倒置的y轴?

问题描述

我有绘制图形的代码,以某种方式将图形绘制为反向y轴,即,如果图形的原点位于左下角,则该图形中的y轴具有y原点(0 )在图表的左上角,我尚未将轴设置为反转,但看不到为什么会这样。

代码

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.legend_handler import HandlerLine2D

from pylab import figure,show,legend,ylabel,xlabel

# load data as a pandas dataframe
df = pd.read_csv('TemCircles_cal_SDN.txt',sep='\t',lineterminator='\r')

# Do stuff

fig1=plt.figure(1)
if len(blob0)>0:
    plt.plot(blob0_et,blob0_acc,"s",color="blue",markersize=5)
if len(blob1)>0:
    plt.plot(blob1_et,blob1_acc,color="red",markersize=5)
if len(blob2)>0:    
    plt.plot(blob2_et,blob2_acc,color="green",markersize=5)

plt.axis([0,250,50])
plt.show()

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)