from vtk import *

reader1 = vtkXMLTreeReader()
reader1.SetFileName("treetest.xml")
reader1.Update()

numeric = vtkStringToNumeric()
numeric.SetInputConnection(reader1.GetOutputPort())

view = vtkTreeMapView()
view.SetAreaSizeArrayName("size");
view.SetAreaColorArrayName("level");
view.SetAreaLabelArrayName("name");
view.SetAreaLabelVisibility(True);
view.SetAreaHoverArrayName("name");
view.SetLayoutStrategyToSquarify();
view.SetRepresentationFromInputConnection(numeric.GetOutputPort());

# Apply a theme to the views
theme = vtkViewTheme.CreateMellowTheme()
view.ApplyViewTheme(theme)
theme.FastDelete()

view.ResetCamera()
view.Render()

view.GetInteractor().Start()

43357a537ad1afe454f23f42ccf3c90e2e2e7e07
<mask token>

<mask token>
reader1.SetFileName('treetest.xml')
reader1.Update()
<mask token>
numeric.SetInputConnection(reader1.GetOutputPort())
<mask token>
view.SetAreaSizeArrayName('size')
view.SetAreaColorArrayName('level')
view.SetAreaLabelArrayName('name')
view.SetAreaLabelVisibility(True)
view.SetAreaHoverArrayName('name')
view.SetLayoutStrategyToSquarify()
view.SetRepresentationFromInputConnection(numeric.GetOutputPort())
<mask token>
view.ApplyViewTheme(theme)
theme.FastDelete()
view.ResetCamera()
view.Render()
view.GetInteractor().Start()

<mask token>
reader1 = vtkXMLTreeReader()
reader1.SetFileName('treetest.xml')
reader1.Update()
numeric = vtkStringToNumeric()
numeric.SetInputConnection(reader1.GetOutputPort())
view = vtkTreeMapView()
view.SetAreaSizeArrayName('size')
view.SetAreaColorArrayName('level')
view.SetAreaLabelArrayName('name')
view.SetAreaLabelVisibility(True)
view.SetAreaHoverArrayName('name')
view.SetLayoutStrategyToSquarify()
view.SetRepresentationFromInputConnection(numeric.GetOutputPort())
theme = vtkViewTheme.CreateMellowTheme()
view.ApplyViewTheme(theme)
theme.FastDelete()
view.ResetCamera()
view.Render()
view.GetInteractor().Start()

from vtk import *
reader1 = vtkXMLTreeReader()
reader1.SetFileName('treetest.xml')
reader1.Update()
numeric = vtkStringToNumeric()
numeric.SetInputConnection(reader1.GetOutputPort())
view = vtkTreeMapView()
view.SetAreaSizeArrayName('size')
view.SetAreaColorArrayName('level')
view.SetAreaLabelArrayName('name')
view.SetAreaLabelVisibility(True)
view.SetAreaHoverArrayName('name')
view.SetLayoutStrategyToSquarify()
view.SetRepresentationFromInputConnection(numeric.GetOutputPort())
theme = vtkViewTheme.CreateMellowTheme()
view.ApplyViewTheme(theme)
theme.FastDelete()
view.ResetCamera()
view.Render()
view.GetInteractor().Start()

from vtk import *

reader1 = vtkXMLTreeReader()
reader1.SetFileName("treetest.xml")
reader1.Update()

numeric = vtkStringToNumeric()
numeric.SetInputConnection(reader1.GetOutputPort())

view = vtkTreeMapView()
view.SetAreaSizeArrayName("size");
view.SetAreaColorArrayName("level");
view.SetAreaLabelArrayName("name");
view.SetAreaLabelVisibility(True);
view.SetAreaHoverArrayName("name");
view.SetLayoutStrategyToSquarify();
view.SetRepresentationFromInputConnection(numeric.GetOutputPort());

# Apply a theme to the views
theme = vtkViewTheme.CreateMellowTheme()
view.ApplyViewTheme(theme)
theme.FastDelete()

view.ResetCamera()
view.Render()

view.GetInteractor().Start()
