I want to make a categorical plot in python to represent the range of several variables. I thought maybe I would use a bar plot and set ranges for the bars. Here is my bar plot
import matplotlib.pyplot as plt
import numpy as np
data = {'a':.3, 'b': .3, 'c': .3, 'd': .1,'e':.1,'f':.1}
names = list(data.keys())
values = list(data.values())
plt.bar(names,values)
plt.show()
Barplot produced from given code:
Please tell me how set the value of the bars to something like
range(.3,.4)
. In other words, I want the bars to go from say (.3 to .4 to represent a range) instead of (0 to .3 the way it currently is).
I know using a barplot to represent a range is odd, and if someone has another way for me to do this please add your code. I don't really care as long as I get a plot which represents ranges of at least 6 variables in which I can easily and manually change the value of the ranges.