mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Pamhyr: Change time edition and plot display (exp BC).
This commit is contained in:
1 parent
5226836211
commit
065e1f063f
6 files changed
+62
-72
No files matched your search
@@ -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
|
||||
)
|
||||
Reference in new issue
Block a user