Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions act/plotting/distributiondisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def plot_stacked_bar(
self.fig = plt.figure()
if self.axes is None:
self.axes = np.array([plt.axes()])
self.fig.add_axes(self.axes[0])

if sortby_field is not None:
if 'units' in ydata.attrs:
Expand Down Expand Up @@ -330,7 +329,6 @@ def plot_size_distribution(
self.fig = plt.figure()
if self.axes is None:
self.axes = np.array([plt.axes()])
self.fig.add_axes(self.axes[0])

# Set Title
if set_title is None:
Expand Down Expand Up @@ -578,7 +576,7 @@ def plot_heatmap(
if x_bins is not None and isinstance(x_bins, int):
x_bins = np.linspace(xdata.values.min(), xdata.values.max(), x_bins)

if y_bins is not None and isinstance(x_bins, int):
if y_bins is not None and isinstance(y_bins, int):
y_bins = np.linspace(ydata.values.min(), ydata.values.max(), y_bins)

if x_bins is not None and y_bins is None:
Expand Down Expand Up @@ -825,7 +823,7 @@ def plot_violin(
'or more datasets in the TimeSeriesDisplay '
'object.'
)
if dsname is None:
elif dsname is None:
dsname = list(self._ds.keys())[0]

ds = self._get_data(dsname, field)
Expand Down
21 changes: 18 additions & 3 deletions examples/plotting/plot_stripes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,24 @@

# SGP E13 MET data has already been processed to yearly averages,
# removing data flagged by embedded qc and DQRs
url = 'https://raw.githubusercontent.com/AdamTheisen/ARM-Climatologies/refs/heads/main/results/sgpmetE13.b1_temp_mean_Y.csv'
col_names = ['time', 'temperature', 'count']
ds = act.io.read_csv(url, column_names=col_names, index_col=0, parse_dates=True)
url = 'https://raw.githubusercontent.com/AdamTheisen/ARM-Climatologies/refs/heads/main/results/sgpmetE13.b1_temp_mean_YS.csv'
col_names = [
'time',
'temperature',
'count',
'minimum',
'maximum',
'standard_deviation',
'standard_error',
]
ds = act.io.read_csv(
url,
column_names=col_names,
index_col=0,
parse_dates=['time'],
date_format="%Y-%m-%dT%H:%M:%S",
header=0,
)

# Drop years with less than 500000 samples
ds = ds.where(ds['count'] > 500000)
Expand Down
Binary file modified tests/plotting/baseline/test_heatmap2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading