Merged Rolf Schmidt's illysam branch
[hooke.git] / hooke / plugin / plot.py
1 #!/usr/bin/env python
2
3 '''
4 plot.py
5
6 Global settings for plots
7
8 Copyright 2010 by Dr. Rolf Schmidt (Concordia University, Canada)
9
10 This program is released under the GNU General Public License version 2.
11 '''
12
13 class plotCommands:
14
15     def do_preferences(self):
16         active_file = self.GetActiveFile()
17         for curve in active_file.plot.curves:
18             curve.decimals.x = self.GetIntFromConfig('plot', 'preferences', 'x_decimals')
19             curve.decimals.y = self.GetIntFromConfig('plot', 'preferences', 'y_decimals')
20             curve.legend = self.GetBoolFromConfig('plot', 'preferences', 'legend')
21             curve.prefix.x = self.GetStringFromConfig('plot', 'preferences', 'x_prefix')
22             curve.prefix.y = self.GetStringFromConfig('plot', 'preferences', 'y_prefix')
23
24         self.UpdatePlot();