Python | Histograms in Vincent



Requirement: Install Vincent

 $ pip install vincent 

warning: Requires Panda, which requires NumPy

Example 1: simple bar chart

# import Vincent`s library

import vincent

 
# Initialize Vincent in the notebook
vincent.core.initialize_notebook ()

 
# pass parameters to the bar method

bar = vincent.Bar ([ 30 , 10 , < / code> 20 , 15 , 45 , 30 , 5 ])

  
# Show histogram
bar.display ()

Output:

Example 2: Histogram with axis labels

# import Vincent`s library

import vincent

< p>  
# Initialize Vincent in notebook
vincent .core.initialize_notebook ()

 
# pass 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` )

  
# Show histogram
bar.display ()

Output:

For more information on Vincent and Vincent`s histograms visit this link