Pamhyr: Change time edition and plot display (exp BC).

This commit is contained in:
Pierre-Antoine Rouby committed 2024-02-16 10:04:22 +01:00
1 parent 5226836211
commit 065e1f063f
6 files changed
+62 -72

No files matched your search

+13
View File
@@ -17,6 +17,9 @@
# -*- coding: utf-8 -*-
import matplotlib.colors as mplcolors
from matplotlib import ticker
from tools import timestamp_to_old_pamhyr_date
from View.Tools.Plot.APlot import APlot
from View.Tools.Plot.PamhyrCanvas import MplCanvas
@@ -184,3 +187,13 @@ class PamhyrPlot(APlot):
def toolbar_update(self):
if self._toolbar is not None:
self._toolbar.update()
def set_ticks_time_formater(self):
self.canvas.axes.xaxis.set_major_formatter(
lambda x, pos: timestamp_to_old_pamhyr_date(int(x))
)
self.canvas.axes.tick_params(
labelsize=9,
labelrotation=45
)