Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Python Visual drawing Library how to use Altair tool

Shulou Source: shulou.com Published: 2022-06-01 06:55:09 10月04日 Update

Python visual drawing library Altair tool how to use, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Altair is the declarative statistics visualization library of Python, based on Vega and Vega Lite, and the source code is available on GitHub.

With Altair, you can spend more time understanding the data and its meaning. Altair's API is simple, friendly, and consistent, built on the powerful visual syntax of Vega Lite. This elegant simplicity can produce beautiful and effective visualization with a minimum of code.

Installation

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

Core Altair package and its dependencies

The front-end renderer to use (that is, Jupyter notebook, JupyterLab, Colab, or Interact)

In addition, Altair's documentation uses the vega_ dataset package, so it is included in the installation instructions below.

We recommend using JupyterLab to install Altair.

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

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

$conda install-c conda-forge altair vega_datasets jupyterlab

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

$pip install-U altair vega_datasets jupyterlab

When you are finished, run:

$jupyter lab

In the launched browser window, select File-> New-> Notebook, and then click Select without changing the kernel (it should be "Python 2" or "Python 3" depending on the version of Python you are running).

The answer to the question about how to use the Altair tool in Python visual drawing library is shared here. I hope the above content can be of some help to everyone. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Tags: Visualization versions runs tools more questions drawings commands effects data notes notebooks help solutions choices powerful easy effective beautiful consistent Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Technology Redmi OPPO Reno Linux