前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >[必备工具]Python可视化绘图库Altair

[必备工具]Python可视化绘图库Altair

作者头像
MeteoAI
发布2019-12-17 17:29:53
1.6K0
发布2019-12-17 17:29:53
举报
文章被收录于专栏:MeteoAIMeteoAIMeteoAI

https://altair-viz.github.io/index.html

Altair is a declarative statistical visualization library for Python, based on Vega and Vega-Lite, and the source is available on GitHub.

With Altair, you can spend more time understanding your data and its meaning. Altair’s API is simple, friendly and consistent and built on top of the powerful Vega-Lite visualization grammar. This elegant simplicity produces beautiful and effective visualizations with a minimal amount of code.

Getting Started

  • Overview
  • Installation
  • Basic Statistical Visualization

Gallery

  • Example Gallery

User Guide

  • Specifying Data in Altair
  • Encodings
  • Marks
  • Data Transformations
  • Bindings, Selections, Conditions: Making Charts Interactive
  • Top-Level Chart Configuration
  • Compound Charts: Layer, HConcat, VConcat, Repeat, Facet
  • Scale and Guide Resolution
  • Saving Altair Charts
  • Customizing Visualizations
  • Times and Dates in Altair
  • Frequently Asked Questions
  • Display Troubleshooting
  • Altair Renderers
  • Altair Internals: Understanding the Library
  • API Reference
  • Altair Ecosystem

Case Studies

  • Exploring Seattle Weather

Advanced Usage

  • Importing Vega & Vega-Lite Versions
  • Displaying Charts in Various Frontends
  • Customizing Renderers
  • Data transformers

Installation

To use Altair for visualization, you need to install two sets of tools

  1. The core Altair Package and its dependencies
  2. The renderer for the frontend you wish to use (i.e. Jupyter Notebook, JupyterLab, Colab, or nteract)
  3. Additionally, Altair’s documentation makes use of the vega_datasets package, and so it is included in the installation instructions below.

Depending on the frontend you would like to use, the instructions differ slightly. See the following instructions for your chosen frontend:

  • Quick Start: Altair + JupyterLab
  • Quick Start: Altair + Notebook
  • Quick Start: Altair + Colab

Quick Start: Altair + JupyterLab

We recommend installing Altair with JupyterLab. If you would like to use it with the classic notebook, see Quick Start: Altair + Notebook.

Altair version 3 works best with JupyterLab version 1.0 or later.

To install JupyterLab and Altair with conda, run the following command:

$ conda install -c conda-forge altair vega_datasets jupyterlab

To install JupyterLab and Altair with pip, run the following command:

$ pip install -U altair vega_datasets jupyterlab

Once this is finished, run:

$ jupyter lab

In the browser window that launches, select “File”->”New”->”Notebook” and then click “Select” without changing the kernel (it should say “Python 2” or “Python 3” depending on which Python version you are running).

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-11-29,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 MeteoAI 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Installation
    • Quick Start: Altair + JupyterLab
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档