-
Notifications
You must be signed in to change notification settings - Fork 22
[WIP] joss paper #260
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
base: main
Are you sure you want to change the base?
[WIP] joss paper #260
Changes from 7 commits
7282ce5
f7c1090
e44123b
712a989
557c5ff
c1b3778
cea0eda
e79a7b5
fe8f169
52a9ba0
8cbc9f7
37074f3
8afe522
469cc6b
9e0f9b6
6683cc6
b2c15b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| @Article{Hunter:2007, | ||
| Author = {Hunter, J. D.}, | ||
| Title = {Matplotlib: A 2D graphics environment}, | ||
| Journal = {Computing in Science \& Engineering}, | ||
| Volume = {9}, | ||
| Number = {3}, | ||
| Pages = {90--95}, | ||
| abstract = {Matplotlib is a 2D graphics package used for Python for | ||
| application development, interactive scripting, and publication-quality | ||
| image generation across user interfaces and operating systems.}, | ||
| publisher = {IEEE COMPUTER SOC}, | ||
| doi = {10.1109/MCSE.2007.55}, | ||
| year = 2007 | ||
| } | ||
|
|
||
| @unpublished{interactive_Jupyter_widgets, | ||
| author = {Jupyter widgets community}, | ||
| title = {ipywidgets, a GitHub repository}, | ||
| year = {2015}, | ||
| note = {Retrieved from https://github.com/jupyter-widgets/ipywidgets} | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,150 @@ | ||||||
| --- | ||||||
| title: "mpl-interactions: A Python package for Interactive Matplotlib Figures" | ||||||
| tags: | ||||||
| - Python | ||||||
| - Matplotlib | ||||||
| - Ipywidgets | ||||||
| - Interactive | ||||||
| - Visualization | ||||||
| authors: | ||||||
| - name: Ian Hunt-Isaak | ||||||
| orcid: 0000-0002-7591-083X | ||||||
| affiliation: 1 # (Multiple affiliations must be quoted) | ||||||
| - name: Doeke Hekstra | ||||||
| orcid: 0000-0003-2332-9223 | ||||||
| affiliation: "1, 2" # (Multiple affiliations must be quoted) | ||||||
| affiliations: | ||||||
| - name: John A. Paulson School of Engineering and Applied Sciences, Harvard University, Cambridge, MA, USA | ||||||
| index: 1 | ||||||
| - name: Department of Molecular and Cellular Biology, Harvard University, Cambridge, MA, USA | ||||||
| index: 2 | ||||||
| date: 31 May 2023 | ||||||
| bibliography: paper.bib | ||||||
| --- | ||||||
|
|
||||||
| # Summary | ||||||
|
|
||||||
| <!-- A summary describing the high-level functionality and purpose of the software for a diverse, non-specialist audience. --> | ||||||
|
|
||||||
| Data exploration, model building and pedagogy all benefit from the ability to interactively update elements in Matplotlib [@Hunter:2007] figures. `mpl-interactions` enables this by making it easy for users to create matplotlib figures in which the displayed data can be dynamically controlled through widgets. These widgets can be automatically generated by passing arguments such as arrays or shorthands (such as a tuple of numbers to generate a slider) to modified pyplot functions. After creation of these widgets, `mpl-interactions` updates plot elements without further user intervention. For ease of use, it adds these features while otherwise staying close to the `matplotlib.pyplot` interface. `mpl-interactions` is built such that parameters controlled by the generated widgets are easy to re-use for multiple plot elements, while not interfering with static elements. This design allows for building any figure that `matplotlib` can produce, while adding interactivity to specific parts as desired. | ||||||
|
|
||||||
| Complete Tutorials, Examples, and API documentation are available on https://mpl-interactions.readthedocs.io/en/stable/. | ||||||
|
|
||||||
| # Statement of Need | ||||||
|
|
||||||
| <!-- A Statement of need section that clearly illustrates the research purpose of the software and places it in the context of related work. --> | ||||||
|
|
||||||
| The ability to interact dynamically with plots through widgets such as sliders can be a powerful tool in the scientific process and in pedagogy. For instance, varying a parameter of a mathematical model plotted on top of data helps to understand the relationship between the model and the data. Similarly, exploratory data analysis can be enhanced by interactively modifying aspects of the plot such as which points are displayed, or the threshold level of a displayed image. | ||||||
|
|
||||||
| Matplotlib provides mechanisms for updating elements (artists) in figures. However, the APIs for these artists are not consistent and some are under- or undocumented. Furthermore, the creation and positioning of the native Matplotlib widgets is nontrivial. While the `ipywidgets` [@interactive_Jupyter_widgets] library makes widget creation and positioning easier, it is difficult to integrate with matplotlib in a performant manner. The easiest way to do so is to use the `ipywidgets`' `interact()` function, which automatically generates sliders and other widgets to control arguments to arbitrary python functions. However, this can result in completely regenerating the figure which can be slow. Alternatively, the user needs to remember the specifics of how to update each individual artist. The final issue is that `ipywidgets` is a general framework, and thus constrained in its choices of how to interpret shorthands for widget generation -- as such, the choices it makes are not always optimal for scientific plotting. | ||||||
|
||||||
| Matplotlib provides mechanisms for updating elements (artists) in figures. However, the APIs for these artists are not consistent and some are under- or undocumented. Furthermore, the creation and positioning of the native Matplotlib widgets is nontrivial. While the `ipywidgets` [@interactive_Jupyter_widgets] library makes widget creation and positioning easier, it is difficult to integrate with matplotlib in a performant manner. The easiest way to do so is to use the `ipywidgets`' `interact()` function, which automatically generates sliders and other widgets to control arguments to arbitrary python functions. However, this can result in completely regenerating the figure which can be slow. Alternatively, the user needs to remember the specifics of how to update each individual artist. The final issue is that `ipywidgets` is a general framework, and thus constrained in its choices of how to interpret shorthands for widget generation -- as such, the choices it makes are not always optimal for scientific plotting. | |
| Matplotlib provides mechanisms for updating elements (artists) in figures. However, the APIs for these artists can be inconsistent and some are not well documented. Furthermore, the creation and positioning of the native Matplotlib widgets is nontrivial. While the `ipywidgets` [@interactive_Jupyter_widgets] library makes widget creation and positioning easier, it is difficult to integrate with matplotlib in a performant manner. The easiest way to do so is to use the `ipywidgets`' `interact()` function, which automatically generates sliders and other widgets to control arguments to arbitrary python functions. However, this can result in completely regenerating the figure, which can be slow. Alternatively, the user needs to remember the specifics of how to update each individual artist. The final issue is that `ipywidgets` is a general framework, and thus constrained in its choices of how to interpret shorthands for widget generation. As such, the choices it makes are not always optimal for scientific plotting. |
Just some minor suggestions here.
Btw, matplotlib or Matplotlib? 🤔 Same for some other package names.
Outdated
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.
For the paper, I would use pinned URLs, e.g. of the latest version:
[Animation Documentation](https://mpl-interactions.readthedocs.io/en/0.23.0/examples/animations.html)
ianhi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
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.
attention: @redeboer @samanthahamilton I hope you don't mind getting a shout out here :)
The other people I know in real life so will check with them offline
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.
(here no pinned URL, see other comment)