Skip to content

Commit

Permalink
Merge pull request #14 from viliml/patch-1
Browse files Browse the repository at this point in the history
Fix plot ticks.
  • Loading branch information
Infiziert90 authored Apr 15, 2021
2 parents c9519d9 + 1a33cc1 commit 6991443
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions getnative/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def save_plot(self, vals):
plot.style.use('dark_background')
fig, ax = plot.subplots(figsize=(12, 8))
ax.plot(range(self.min_h, self.max_h + 1, self.steps), vals, '.w-')
dh_sequence = tuple(range(500, 1001, self.steps))
ticks = tuple(dh for i, dh in enumerate(dh_sequence) if i % (50 // self.steps) == 0)
dh_sequence = tuple(range(self.min_h, self.max_h + 1, self.steps))
ticks = tuple(dh for i, dh in enumerate(dh_sequence) if i % ((self.max_h - self.min_h + 10 * self.steps - 1) // (10 * self.steps)) == 0)
ax.set(xlabel="Height", xticks=ticks, ylabel="Relative error", title=self.filename, yscale="log")
if self.show_plot:
plot.show()
Expand Down

0 comments on commit 6991443

Please sign in to comment.