数据可视化

Seaborn使用(2):Choosing color palettes

HuGuoDong

调色板

颜色很重要,如果使用的好,就会帮助你突出数据的特征。

  • color_palette()能传入任何Matplotlib所支持的颜色
  • color_palette()不写参数则默认颜色
  • set_palette()设置所有图的颜色

下面是使用seaborn的color palettes的一些例子,这些例子官网上面都已经有详细的介绍。

网址为:http://seaborn.pydata.org/tutorial/color_palettes.html#palette-tutorial

Seaborn使用(1):Controlling figure aesthetics

HuGuoDong

风格设置

Drawing attractive figures is important. When making figures for yourself, as you explore a dataset, it’s nice to have plots that are pleasant to look at. Visualizations are also central to communicating quantitative insights to an audience, and in that setting it’s even more necessary to have figures that catch the attention and draw a viewer in.

matplot的使用之二:柱状图、散点图

HuGuoDong
import pandas as pd
reviews = pd.read_csv('fandango_scores.csv')
cols = ['FILM', 'RT_user_norm', 'Metacritic_user_nom', 'IMDB_norm', 'Fandango_Ratingvalue', 'Fandango_Stars']
norm_reviews = reviews[cols]
print(norm_reviews[:1])