Plottery combines graphical interface with code for better Matplotlib plots
Plottery: A Code-Integrated GUI for Matplotlib
Human-Computer Interaction
Summary
Creating plots with code can be powerful but tricky, while graphical tools are easier but less flexible. The authors introduce Plottery, a tool that adds a graphical interface to the widely used Matplotlib plotting library inside Jupyter notebooks. Changes made through the graphical interface automatically update the code, letting users switch smoothly between clicking and coding. This mixed approach helps people make visual changes quickly without losing the power of programming.
What this means in practice
- •For data analysts: Use Plottery to create and adjust Matplotlib plots quickly by mixing graphical edits with code inside notebooks.
- •For software developers: Integrate Plottery into data apps or tools to allow users to modify visualizations both by GUI and code in real time.
Authors
Brian Hempel, Ruanqianqian Huang, Devamardeep Hayatpur, Sorin Lerner, Haijun Xia
Abstract
Scientists have many tools to author plots: graphical direct manipulation apps like a spreadsheet's chart builder, text-based programming tools like Matplotlib and ggplot2, or AI chat interfaces. Textual code is the most capable of these, but writing code, even with AI assistance, is a potentially poor fit for graphical chart design. We present Plottery, a Jupyter notebook extension that leverages API type annotations to add graphical direct manipulation to the popular Matplotlib plotting library. User interactions in Plottery's in-situ graphical interface are immediately reified in the user's code, so they may seamlessly mix-and-match between GUI, code, and AI interactions. In a user study, participants seamlessly alternated modalities, with the GUI used for straightforward visual changes, code for quick edits or duplicating code, and the AI for broad support. Plottery showcases graphical interaction that retains code's benefits.