Skip to content

Commit

Permalink
[vis] Label x ticks for line plots
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Dec 17, 2023
1 parent 6399f58 commit dddebb4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phi/vis/_matplotlib/_matplotlib_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def plot(self, data: Field, figure, subplot, space: Box, min_val: float, max_val
subplot.legend()
# elif min_val is not None and max_val is not None:
# subplot.set_ylim((min_val - .02 * (max_val - min_val), max_val + .02 * (max_val - min_val)))
if spatial(data).item_names[0]: # label x ticks
subplot.set_xticks(x, spatial(data).item_names[0])


class BarChart(Recipe):
Expand Down

0 comments on commit dddebb4

Please sign in to comment.