earthlab / matplotcheck

A python package for checking and testing matplotlib plots. We use this for autograding student assignments but there are many other potential use cases including package testing (for packages with plots)!
https://matplotcheck.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Create Vignette for using base plot tester #122

Closed lwasser closed 4 years ago

lwasser commented 5 years ago

let's create a vignette for base plot tester. Following earthpy for an example of creating a vignette. https://github.com/earthlab/earthpy/blob/master/examples/plot_bands_functionality.py

it will become an example in the gallery like this: https://earthpy.readthedocs.io/en/latest/gallery_vignettes/index.html

In this vignette:

  1. create a basic scatter plot
  2. create a plot tester object for it.
  3. test that:
    • the title contains a word,
    • that there is an x and y axis label
    • that the plot is of type scatter plot
    • test that the data are correct in the plot

i believe i'll have to setup the gallery functionality in matplotcheck like it's setup in earthpy

https://github.com/earthlab/matplotcheck/blob/master/docs/conf.py#L43 https://github.com/earthlab/earthpy/blob/master/docs/conf.py#L48

for this to work properly and build locally.

lwasser commented 5 years ago

@lwasser needs to get a good assignment from @jlpalomino !! jenny do you have a homework assignment that we can use as a use case for matplotcheck?! i'll ping you on slack as well.