I have two data frames with i need to plot in one axis. Unfortunately one of displayed data and xticks are shifted to the left.
Test example:
impo
I was only able to solve this by doing the plot in matplotlib directly:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.DataFrame()
df['x'] = np.linspace(20, 30, 10)
df['y'] = np.random.randint(1, 10, 10)
df2 = pd.DataFrame()
df2['x'] = np.linspace(1, 40, 50)
df2['y'] = np.random.randint(1, 10, 50)
fig, ax = plt.subplots()
ax.bar(x=df.x, height=df.y)
ax.plot(df2.set_index('x'), c='red')