Permalink
Browse files

Merge pull request #12517 from aeslaughter/chigger-improvements

Minor improvements to chigger
  • Loading branch information...
permcody committed Nov 20, 2018
2 parents ad261b9 + d3b9647 commit 642842245c2a9bd78d29a4ca3f6f6143db7435c1
Showing with 12 additions and 2 deletions.
  1. +8 −0 python/chigger/RenderWindow.py
  2. +4 −2 python/chigger/utils/AxisOptions.py
@@ -12,6 +12,7 @@
import vtk
import base
import annotations
import observers
import misc
import mooseutils
@@ -63,8 +64,15 @@ def __init__(self, *args, **kwargs):
self._results = [misc.ChiggerBackground()]
self.__active = None
self.__watermark = annotations.ImageAnnotation(filename='chigger_white.png',
width=0.025,
horizontal_alignment='left',
vertical_alignment='bottom',
position=[0, 0])
# Store the supplied result objects
self.append(*args)
if kwargs.pop('chigger', False):
self.append(self.__watermark)
def __contains__(self, item):
"""
@@ -33,7 +33,7 @@ def get_options():
opt.add('tick_font_size', "The axis tick label font size, in points.", vtype=int)
opt.add('grid', True, "Show/hide the grid lines for this axis.")
opt.add('grid_color', [0.25, 0.25, 0.25], "The color for the grid lines.")
opt.add('precision', 3, "The axis numeric precision.", vtype=int)
opt.add('precision', "The axis numeric precision.", vtype=int)
opt.add('notation', "The type of notation, leave empty to let VTK decide", vtype=str,
allow=['standard', 'scientific', 'fixed', 'printf'])
opt.add('ticks_visible', True, "Control visibility of tickmarks on colorbar axis.")
@@ -44,6 +44,7 @@ def get_options():
opt.add('axis_point1', [0, 0], 'Starting location of axis, in absolute viewport coordinates.')
opt.add('axis_point2', [0, 0], 'Ending location of axis, in absolute viewport coordinates.')
opt.add('axis_scale', 1, "The axis scaling factor.", vtype=float)
opt.add('axis_factor', 0, "Offset the axis by adding a factor.", vtype=float)
opt.add('zero_tol', 1e-10, "Tolerance for considering limits to be the same.")
return opt
@@ -83,7 +84,8 @@ def set_options(vtkaxis, opt):
vtkaxis.SetCustomTickPositions(None, None)
vtkaxis.SetBehavior(vtk.vtkAxis.FIXED)
scale = opt['axis_scale']
vtkaxis.SetRange(lim[0] * scale, lim[1] * scale)
factor = opt['axis_factor']
vtkaxis.SetRange(lim[0] * scale + factor, lim[1] * scale + factor)
vtkaxis.RecalculateTickSpacing()
else:
vtkaxis.SetBehavior(vtk.vtkAxis.AUTO)

0 comments on commit 6428422

Please sign in to comment.