I have a figure containing a graph and two tables.
I want to align the x-position of each sample with the center of the respective column.
The amount of columns is the same as the amount of samples to plot.
I have found this related question, which covers the same question but for a bar chart.
I couldn't transfer the result to my case.
Here is a minimal, working code example:
import matplotlib.pyplot
import numpy as np
a = np.arange(20)
b = np.random.randint(1, 5, 20)
fig, ax = plt.subplots()
ax.plot(a, b, marker='o')
ax.table(np.random.randint(1, 5, (4, 20)), loc="top")
ax.table(np.random.randint(1, 5, (4, 20)))
ax.set_xticklabels([])
plt.subplots_adjust(top=0.85, bottom=0.15)
fig.savefig('test.png')
It creates this output:
As you can see, the circles representing the samples are not centered towards the respective columns.
Any help appreciated!
