[plotter] remove plot_radial (fix issue #8)
This commit is contained in:
+6
-49
@@ -808,53 +808,6 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
|
||||
plt.streamplot(hh, vv, map_Bh_red, map_Bv_red, **kwargs)
|
||||
|
||||
def _plot_radial(
|
||||
self,
|
||||
name,
|
||||
ax_los,
|
||||
run,
|
||||
ylabel=None,
|
||||
xlog=False,
|
||||
ylog=False,
|
||||
ytransform=None,
|
||||
label=None,
|
||||
title=None,
|
||||
nml_key=None,
|
||||
put_title=True,
|
||||
put_time=True,
|
||||
unit_time=U.Myr,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Plot a radial profile (for disks, OUTDATED)
|
||||
"""
|
||||
|
||||
radial_bins = self.save.get_node("/radial/radial_bins_" + ax_los).read()
|
||||
bin_centers = 0.5 * (radial_bins[1:] + radial_bins[:-1])
|
||||
node = self.save.get_node("/radial/{}_{}".format(name, ax_los))
|
||||
mean_bin = node.read()
|
||||
|
||||
if ytransform is not None:
|
||||
mean_bin = ytransform(mean_bin)
|
||||
|
||||
plt.xlabel(r"$r$")
|
||||
|
||||
if xlog:
|
||||
plt.xscale("log")
|
||||
if ylog:
|
||||
plt.yscale("log")
|
||||
|
||||
if ylabel is not None:
|
||||
plt.ylabel(ylabel)
|
||||
|
||||
title = self._snapshot_title(run, node, title, nml_key, put_time, unit_time)
|
||||
if put_title:
|
||||
plt.title(title)
|
||||
if label is None:
|
||||
label = title
|
||||
|
||||
plt.plot(bin_centers, mean_bin, label=label, **kwargs)
|
||||
|
||||
def _plot_hist(
|
||||
self,
|
||||
name,
|
||||
@@ -1682,9 +1635,13 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
for name in averageables:
|
||||
self.rules["rad_" + name] = PlotRule(
|
||||
self,
|
||||
partial(self._plot_radial, "rad_avg_" + name, xlog=True, ylog=True),
|
||||
partial(
|
||||
self._plot,
|
||||
"/radial/radial_centers",
|
||||
"/radial/rad_avg_" + name,
|
||||
),
|
||||
"Azimuthal average of {}".format(name),
|
||||
dependencies=["radial_bins", "rad_avg_" + name],
|
||||
dependencies=["radial_centers", "rad_avg_" + name],
|
||||
)
|
||||
|
||||
self.rules["avg_map_" + name] = PlotRule(
|
||||
|
||||
Reference in New Issue
Block a user