Closed RemDelaporteMathurin closed 10 months ago
mind you, it may work with savefig instead of save_fig.
Anyway, the usage should be imho:
import matplotlib.pyplot as plt
my_plot = rmp.plot_regular_mesh_tally(
tally=tally2,
std_dev_or_tally_value="tally_value",
x_label="X [cm]",
y_label="Y [cm]",
)
plt.ylabel("my custom y label")
plt.savefig("openmc_mesh_tally_plot.png")
In the README, the syntax is:
but this produces the following error:
That's because the function
plot_regular_mesh_values
returns the matplotlib.pyplot module instead of the figure itself.https://github.com/fusion-energy/regular_mesh_plotter/blob/1e422f2dff93e3ec093961791fd1e29ebf2f1bb4/regular_mesh_plotter/core.py#L66
I think these functions shouldn't return anything (apart the current ax maybe) and users should handle everything in matplotlib directly.