Skip to content

Commit

Permalink
Consider possibility of a grid in VeuszPlot.fitSize, FLTD-225
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniele Paganelli committed Nov 15, 2016
1 parent 931439d commit 4aca8f9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions misura/client/graphics/veuszplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,11 @@ def fitSize(self, zoom=False):
return
self.cmd.Set(page.path+'/width', str(w) + 'in')
self.cmd.Set(page.path+'/height', str(h) + 'in')
if g == '/time' or g.endswith('_t'):
g += '/time'
elif g == '/temperature' or g.endswith('_T'):
g += '/temp'
wg = searchFirstOccurrence(page, 'grid', 1)
if wg is None:
wg = searchFirstOccurrence(page, 'graph', 1)
g = wg.path

if h < 2 or w < 4:
self.cmd.Set(g + '/leftMargin', '0.1cm')
self.cmd.Set(g + '/bottomMargin', '0.1cm')
Expand Down

0 comments on commit 4aca8f9

Please sign in to comment.