-
Notifications
You must be signed in to change notification settings - Fork 163
Enhancement/plot class #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We need to add the ability to return the Recommend changing the function signature to: def plot(self, export_image_path=None, return_plotter=False, show=True): That way, downstream users can add to the existing pyvista plotter and make their own animations or scenes. Then, in pl = hfss.plot.plot_model_obj(return_plotter=True)
##############################
# Add Radar Data to Plotter
radar_sgrid = pyvista.StructuredGrid(x, y, z)
# add individual radar frames
for i in range(100):
radar_sgrid['radar_%03d' % i] = mydata[i]
pl.add_mesh(radar_sgrid)
# then animate by following this example
# https://docs.pyvista.org/examples/02-plot/gif.html
#
# Differences:
# - don't plotter.write_frame()
# - don't update_scalars, rather radar_sgrid.active_scalars_name = 'radar_%03d' % frame Pinging @ushechip Main point is to provide an interface so we can customize the output from: Or, export to html with: pl.export_html('myplot.html') |
self._color = (0, 0, 0) | ||
self.color = color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you can only set the protected attribute. Then the color property will return the correct value latter on.
self._color = (0, 0, 0) | |
self.color = color | |
self._color = color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the color setter is handling both a tuple or a string "white". That's why you have to use the setter and not instantiate directly the internal variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, got it.
Co-authored-by: Maxime Rey <[email protected]>
No description provided.