So I am trying to plot a data set that looks something like this:
cat a b c
idk 0.47 0.58 1.17
yeet 0.38 0.11 -0.8
skeet 0.03 0.14 0.46
Basically, cat is a categorical variable, a and b are variables which are in a range of [0,1] while c is a variable which ranges from [-7,7] and I want a plot where the x axis is the categorical variable with the left y axis being [0,1] corresponding to a&b while the right y axis corresponds to c.
I can plot all of them with the same y axis, which obviously is not ideal and in trying to plot the different y axes with
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax2 = ax1.twinx()
width = 0.4
wisco_ill_succ.plot.bar(x='cat', y=['a','b'], ax = ax1, position = 0, width = width)
wisco_ill_succ.plot.bar(x='cat', y=['c'], ax = ax2, position = 1, width = width)
I get what I want, however the x axes do not line up and it just looks like a jumbled mess:
I looked at this Pandas: Bar-Plot with two bars and two y-axis but frankly it has not been very helpful. Is there anything I can do or should I just split it up into two different graphs?