Question:
If I choose the plot option stacked = False I get the correct x axis output for my data.

However, when I use stacked = True I get incorrect output showing higher (incorrect) values on the x axis. Nothing else has changed apart from the stacked option.

Am I missing something obvious here?
Data
DataFrame.to_dict() output here
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
cols = ['OpenToLast','OpenToMaxHigh','OpenToMaxLow']
colors = {'OpenToLast':'b', 'OpenToMaxHigh' : '#CCD1F5', 'OpenToMaxLow': '#C6DAF4'}
axnum = auction[cols].plot(kind='barh',
figsize=(6,8),
fontsize=9,
color=[colors[i] for i in cols],
edgecolor = "none",
stacked = False,
legend = True)
axnum.xaxis.set_major_locator(ticker.MultipleLocator(5))
plt.axvline(0, color='B')
Stacked plot stacks the individual bars on top of each other rather than overlapping the data. For eg, your top value at 2016-12-16 is 25(open to last), 30(open to max high) which in stacked plot is 25 and 30 stacked together at 55
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With