Improve example coverage of plotting module
See original GitHub issueAbout 50% of our docstrings in PyVista have examples. This is fairly good, especially considering that many of these objects are not publicly exposed.
However, for modules like pyvista.plotting.plotting
, it would be great to see nearly 100% coverage considering how important it is to be able to demonstrate the individual methods of the Plotting class.
This is a great first issue since it doesn’t involve changing the code base, just providing an example for some of our docstrings in plotting
Feel free to post questions here on how to get started if you’re interested.
Note that many of these examples don’t need to include plotter.show
, and if they write files you can feel free to use the # doctest:+SKIP
directive
Name Docstrings Missed Covered
----------------------------------------------------------------------------
pyvista.plotting.plotting 155 110 29.0%
Some easy ones
-
Plotter.export_vtkjs
-
Plotter.fly_to
-
Plotter.remove_legend
-
Plotter.save_graphic
-
Plotter.add_point_labels
-
Plotter.add_lines
-
Plotter.add_text
-
Plotter.add_legend
(needs to be fixed, plots aren’t great) -
Plotter.add_point_scalar_labels
-
Plotter.add_volume
-
Plotter.increment_point_size_and_line_width
-
Plotter.link_views
-
remove_background_image
-
remove_bounds_axes
-
Plotter.remove_scalar_bar
-
Plotter.render
-
Plotter.reset_camera_clipping_range
-
Plotter.set_environment_texture
-
Plotter.show_axes_all
-
Plotter.show_grid
-
Plotter.view_xy
-
Plotter.view_xz
-
Plotter.view_yx
-
Plotter.view_yz
-
Plotter.view_zx
-
Plotter.view_zy
Attributes:
-
Plotter.background_color
-
Plotter.bounds
-
Plotter.camera
-
Plotter.camera_position
-
Plotter.center
-
Plotter.image
Harder ones
-
Plotter.add_actor
In widgets.py
but exposed in Plotter
-
add_box_widget
-
add_checkbox_button_widget
-
add_line_widget
-
add_mesh_clip_box
-
add_mesh_clip_plane
-
add_mesh_isovalue
-
add_mesh_slice
-
add_mesh_slice_orthogonal
-
add_mesh_slice_spline
-
add_mesh_threshold
-
add_plane_widget
-
add_sphere_widget
-
add_spline_widget
-
add_text_slider_widget
Note that if we use the @wraps
decorator, we need to make the changes to the docstring in the method being wrapped.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
I’ve ticked out
Plotter.add_volume()
, thanks to @puripant, our newest contributor 🎉This is probably the BEST FIRST ISSUE. Thank you very much.