Skip to content
Related Articles

Related Articles

Python | Line Charts in Vincent
  • Last Updated : 26 Aug, 2019

In this article, we will create line 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 line chart




# import the vincent library=
import vincent
  
# To initialize vincent in the notebook
vincent.core.initialize_notebook()
  
# pass the parameters to the bar method
Line = vincent.Line([10, 20, 30, 20, 15, 30, 45])
  
# Display the line chart
Line.display()

Output :



Example 2: line 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
Line = vincent.Line([10, 20, 30, 20, 15, 30, 45])
  
# give axis names
Line.axis_titles(x='X-axis', y='Y-axis')
  
# Display the line chart
Line.display()

Output :

For more information on vincent line charts and vincent visit this link

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up
Recommended Articles
Page :