mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
20 lines
436 B
Python
20 lines
436 B
Python
#!/usr/bin/env python
|
|
from vtk import *
|
|
|
|
source = vtkRandomGraphSource()
|
|
|
|
view = vtkGraphLayoutView()
|
|
view.AddRepresentationFromInputConnection(source.GetOutputPort())
|
|
|
|
theme = vtkViewTheme.CreateMellowTheme()
|
|
view.ApplyViewTheme(theme)
|
|
theme.FastDelete()
|
|
|
|
view.GetRenderWindow().SetSize(600, 600)
|
|
view.SetVertexColorArrayName("VertexDegree");
|
|
view.SetColorVertices(True);
|
|
view.ResetCamera()
|
|
view.Render()
|
|
view.GetInteractor().Start()
|
|
|