Python | Bar Charts in Vincent
In this article, we will create bar charts with the help for vincent. Which is a library in python which does python to vega translation? It has the data capabilities of python and the visualization capabilities of javascript. It is built specifically for plotting Dataframes and series quickly.
Requirement : install vincent
$pip install vincent
warning : requires Pandas which requires numpy
Example 1: Simple bar chart
# import the vincent library import vincent # To initialize vincent in the notebook vincent.core.initialize_notebook() # pass the parameters to the bar method bar = vincent.Bar([30, 10, 20, 15, 45, 30, 5]) # Display the bar chart bar.display() |
Output :

Example 2: Bar chart with axis labels
# import the vincent library import vincent # To initialize vincent in the notebook vincent.core.initialize_notebook() # pass the parameters to the bar method bar = vincent.Bar([30, 10, 20, 15, 45, 30, 5]) # give axis names bar.axis_titles(x ='X-axis', y ='Y-axis') # Display the bar chart bar.display() |
Output :

For more information on vincent bar charts and vincent visit this link
Recommended Posts:
- How to write an empty function in Python - pass statement?
- Operator Functions in Python | Set 2
- Time Functions in Python | Set-2 (Date Manipulations)
- Send mail from your Gmail account using Python
- Python – The new generation Language
- Print Single and Multiple variable in Python
- Increment and Decrement Operators in Python
- str() vs repr() in Python
- Swap two variables in one line in C/C++, Python, PHP and Java
- Generate all permutation of a set in Python
- Class or Static Variables in Python
- trunc() in Python
- Division Operators in Python
- Interesting facts about strings in Python | Set 1
- When to use yield instead of return in Python?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

