[plotter] fix mask bug in particles + new default for tight_layout
This commit is contained in:
@@ -7,6 +7,7 @@ plot : # Plot parameters
|
|||||||
# Overlays
|
# Overlays
|
||||||
vel_red : 40 # Take point each vel_red for velocities
|
vel_red : 40 # Take point each vel_red for velocities
|
||||||
|
|
||||||
|
tight_layout : False # Wheter to apply tight_layout
|
||||||
time_fmt : "time = {:.3g} {}" # Time format string, 1st field is time and 2nd is unit
|
time_fmt : "time = {:.3g} {}" # Time format string, 1st field is time and 2nd is unit
|
||||||
|
|
||||||
disk: # Disk speficic parameters
|
disk: # Disk speficic parameters
|
||||||
|
|||||||
+2
-2
@@ -386,7 +386,7 @@ class Plotter(Aggregator, BaseProcessor):
|
|||||||
if self._needs_computation(overwrite, plot_filename):
|
if self._needs_computation(overwrite, plot_filename):
|
||||||
plot_info = rule.process(arg, **kwargs)
|
plot_info = rule.process(arg, **kwargs)
|
||||||
|
|
||||||
if not self.params.out.interactive and close:
|
if self.params.plot.tight_layout and close:
|
||||||
plt.tight_layout(pad=1)
|
plt.tight_layout(pad=1)
|
||||||
|
|
||||||
if self.params.out.save:
|
if self.params.out.save:
|
||||||
@@ -838,7 +838,7 @@ class Plotter(Aggregator, BaseProcessor):
|
|||||||
part_v = part_v[mask]
|
part_v = part_v[mask]
|
||||||
|
|
||||||
# Scatter plot
|
# Scatter plot
|
||||||
plt.scatter(part_h, part_v, s=mass / 5e3, **kwargs)
|
plt.scatter(part_h, part_v, s=mass[mask] / 5e3, **kwargs)
|
||||||
|
|
||||||
def _overlay_speed(
|
def _overlay_speed(
|
||||||
self, ax_los, im_extent, unit=U.km_s, unit_coeff=1.0, key_v=None, **kwargs
|
self, ax_los, im_extent, unit=U.km_s, unit_coeff=1.0, key_v=None, **kwargs
|
||||||
|
|||||||
Reference in New Issue
Block a user