复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14""" Annotated heatmaps ================== """ import matplotlib.pyplot as plt import seaborn as sns sns.set() # Load the example flights dataset and convert to long-form flights_long = sns.load_dataset("flights") flights = flights_long.pivot("month", "year", "passengers") # Draw a heatmap with the numeric values in each cell f, ax = plt.subplots(figsize=(9, 6)) sns.heatmap(flights, annot=True, fmt="d", linewidths=.5, ax=ax)
解决方法其实很简单直接在最后加上:
复制代码
1
2plt.show()
即可以完美的显示所作的图!!!!!!!!!!!!!!!
最后
以上就是天真可乐最近收集整理的关于解决调用seaborn在pycharm中绘制图显示不出来的问题的全部内容,更多相关解决调用seaborn在pycharm中绘制图显示不出来内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复