Skip to content

Commit 5f2d110

Browse files
committed
Add version info to the plot window title
Fixes #17
1 parent 7ab1009 commit 5f2d110

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/logplot/plot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from collections import defaultdict, OrderedDict
22
import os
3+
import pkg_resources
4+
import shlex
35
import subprocess
46
import sys
5-
import shlex
67

78
import matplotlib.pyplot as plt
89
from matplotlib.lines import Line2D
@@ -108,6 +109,8 @@ def _add_naming(self):
108109
self._fig.suptitle(self._conf.general.plot_title)
109110
plt.xlabel(self._conf.general.y_axis_name)
110111
plt.ylabel(self._conf.general.x_axis_name)
112+
version = pkg_resources.get_distribution("logplot").version
113+
plt.gcf().canvas.set_window_title("logplot {}".format(version))
111114

112115
def _click_callback(self, event):
113116
if event.artist in self._legend_mapping: # click in legend

0 commit comments

Comments
 (0)