question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve example coverage of plotting module

See original GitHub issue

About 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:open
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
adeakcommented, Oct 5, 2021

I’ve ticked out Plotter.add_volume(), thanks to @puripant, our newest contributor 🎉

1reaction
tkoyama010commented, Jul 16, 2022

This is probably the BEST FIRST ISSUE. Thank you very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to plot coverage and depth statistics of a bam file - Biostar
Step #3) To plot the data in R this coverage file will need to be imported and the headers need to be added....
Read more >
Visualizing contig coverages to better understand microbial ...
Visualizing contig coverages to better understand microbial population structures ... Visualize only the coverage of a split across samples: ...
Read more >
ggbio plot coverage adjusted for library size
<div class="preformatted">Hi, Is there an easy way to adjust the coverage plots for library size? As an example, if I do library(ggbio) l…...
Read more >
Creating a coverage plot in R - Dave Tang's blog
Anyway back to the topic; I wanted to create a coverage plot of mapped ... Let's download a BAM file as an example:...
Read more >
Plot showing (a) the improvement in fault coverage upon ...
Download scientific diagram | Plot showing (a) the improvement in fault coverage upon adding new control points, and (b) the fault coverage saturation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found