Pass parameters to Plotter #560
jonnymaserati
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hi Jonny Yes - but I would rather be in favor of subclassing the # in vedo.addons:
class CubeAxes(vtkCubeAxesActor):
...
# in main:
from vedo import *
plt = Plotter()
plt += Sphere()
plt += CubeAxes(...) # all options go here
plt.show()
# equivalent to:
from vedo import *
sph = Sphere()
ca = CubeAxes(sph, **kwargs)
show(sph, ca) what do you think? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there
Are you accepting pull requests?
I've made a couple of tweaks so that I can pass parameters to an instance of
vtkCubeAxesActor
in theaddons
module (for when the parameteraxes=8
is provided toshow
). This allows for the auto rotating labels to be used rather than the fixed ones when the custom axes are used.I've set it to pass
kwargs
which are used to call methods on the object which means that all the methods fromvtk
can then be called viavedo
.Screencast.2021-12-15.11.35.57.mp4
I need to play some more with label formatting etc, but seems to be working fine.
Beta Was this translation helpful? Give feedback.
All reactions