Open XuanZhoudiffer opened 2 years ago
Hi @XuanZhoudiffer,
The figure that comes out of visualize_plot()
is a matplotlib.axes.Axes. You can therefore update its values by changing the axis attributes!
ax = plotter_object.visualize_plot()
ax.set_facecolor('white') # Add your desired color here
ax.figure.savefig(fname='plot.png')
ax = plotter_object.visualize_plot()
ax.collections[0].set_sizes([300]) # Add your size here instead of 300
ax.figure.savefig(fname='plot.png')
These manipulations require some knowledge of the Axis attributes of matplotlib
. I am leaving the issue open as to make it easier we will add the possibility to pass kwargs
used by matplotlib.axes.Axes.scatter(), over which the scatter version of visualize_plot()
is built on top, directly to visualize_plot()
. This way you won't have to manipulate the figure after it is created.
Hi, I am the user of the chemplot, I want to use the figure that come out from the chemplot.
But I have two problems: