python - 使用日期作为 xticks 绘制带有子图的条形图
问题描述
当我试图用 plt 绘制条形图时,我想知道我做错了什么。子图系列 us_gdp。我的最终目标是用 ism_pmi 表示的折线图覆盖它。
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import quandl
ism_pmi = quandl.get("ISM/MAN_PMI", authtoken="-kzUSP1X-aPZE-NCS7xw")
us_gdp = quandl.get("FRED/A191RL1Q225SBEA", authtoken="-kzUSP1X-aPZE-NCS7xw")
fig, ax = plt.subplots(figsize=(12,8))
ax.bar(us_gdp.index,height=us_gdp['Value'])
解决方案
推荐阅读
- javascript - 在 jquery 中查找图像方向?
- node.js - 如何在 AWS Bitnami 服务器上使用 nodejs express 发送静态文件(CSS、js)?
- ios - 将多个自定义 UITableViewCell 链接到单个 xib
- go - Go 中方法的范围是什么?
- java - 在线程中刷新 Java FX 窗口
- image - ColorThief 返回错误的主色
- apache - 使用 apache 代理对节点的请求,但包含特定路径的请求除外
- django - 如何将两个不同的 ListAPIView 转换为单个 ModelViewSet
- javascript - 在 codeigniter 中使用 AJAX 显示数据的模式
- javascript - 在它们被转译并运送到客户端之前,基于每个组件的权限控制来捆绑反应组件