2024-06-09 17:12:20 发布
网友
我有一个正在绘制的数据帧。我需要将y轴的下限改为0,更重要的是使阿根廷的线比其他线更粗
我已经将csv文件读入Python并绘制了它,现在我只需要对绘图进行调整
debt=pd.read_csv(“http://pages.stern.nyu.edu/~dbackus/Data/debt.csv”)
债务=债务。设置_指数(['年])
图,ax=plt.子批次()
图(ax=ax,线宽=2)
像那样的吗
import pandas as pd import matplotlib.pyplot as plt debt = pd.read_csv('http://pages.stern.nyu.edu/~dbackus/Data/debt.csv') debt = debt.set_index(['Year']) fig, ax = plt.subplots() debt['ARG'].plot(ax = ax, linewidth = 1) debt['DEU'].plot(ax = ax, linewidth = 3) debt['GRC'].plot(ax = ax, linewidth = 5)
像那样的吗
相关问题 更多 >
编程相关推荐