Skip to content
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

Add first plotting functions #1

Merged
merged 18 commits into from
Jun 18, 2021
Merged

Add first plotting functions #1

merged 18 commits into from
Jun 18, 2021

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Jun 11, 2021

This adds a small usage section and the following plotting functions

  • audplot.confusion_matrix()
  • audplot.distribution()
  • audplot.scatter()
  • audplot.series()

Tests are only executed as doctests, which means we have only a code coverage of ~95%, but I think this is fine.

It uses the build in plot_directive sphinx plugin of `matplotlib in order to auto-generate figures for the docs:

image

@frankenjoe
Copy link
Collaborator

frankenjoe commented Jun 17, 2021

I find it quite convenient when I can pass an axes object to a plot function. I think we should support it here, too. Then we can do things like:

fig, axs = plt.subplots(2, 1)
confusion_matrix(..., ax=axs[0])
confusion_matrix(..., ax=axs[1])

@hagenw
Copy link
Member Author

hagenw commented Jun 18, 2021

I find it quite convenient when I can pass an axes object to a plot function. I think we should support it here, too. Then we can do things like:

fig, axs = plt.subplots(2, 1)
confusion_matrix(..., ax=axs[0])
confusion_matrix(..., ax=axs[1])

As I'm not the expert on plotting with Python, I would propose that you add this in another pull request after we finished this one.

@frankenjoe
Copy link
Collaborator

As I'm not the expert on plotting with Python, I would propose that you add this in another pull request after we finished this one.

agree

setup.cfg Outdated Show resolved Hide resolved
@frankenjoe
Copy link
Collaborator

When I run the tests I get a DeprecationWarning:

/media/jwagner/Data/Git/pyaudplot/venv/lib/python3.6/site-packages/flake8/plugins/manager.py:254: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    eps = importlib_metadata.entry_points().get(self.namespace, ())

and a FutureWarning:

  /media/jwagner/Data/Git/pyaudplot/venv/lib/python3.6/site-packages/seaborn/distributions.py:2557: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
    warnings.warn(msg, FutureWarning)

at least the second should be easy to get rid of by replacing distplot with histplot. Not sure what causes the first one.

docs/conf.py Outdated Show resolved Hide resolved
@hagenw
Copy link
Member Author

hagenw commented Jun 18, 2021

The deprecation warning we are getting for flake8 is nothing we can change, but something they have to fix in there package.

audplot/core/api.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants