I’m not sure that “duplicating the settings” in the form in which you are describing is really feasible ... it probably requires a lot of low-level access for all the objects involved in the layout (axes, axis objects, line objects, patch objects and etc.). I could be completely wrong, but this is my instinct. I put something here that may come close to what you want, although you don’t need to duplicate a lot of layout specifications.
import matplotlib.pyplot as plt import numpy as np def make_layout(data): fig = plt.figure() ax = fig.add_subplot(111) p, = ax.plot(data,'o') p.set_markerfacecolor('green')
Ajean source share