scipp / scipp/plopp

Add a method to convert plots to dict?

Open
#203 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12
Forks
6
PR merge metrics
No merged PRs in 30d

Description

It may be useful to have the ability to convert plots to a dict that would fully specify the figure.
Just like Scipp has .to_dict(), we could have something that would convert the plot to a dict which would be interpretable and plotted using any plotting library, not just Matplotlib.

The dict would contain all the info needed to build the figure (non-exhaustive list):

  • the number of axes
  • the limits of the axes
  • the axes labels
  • the type of plot (lines or image or contours...)
  • the data to plot
  • the font sizes
  • the figure title

A python dict is easily convertible to JSON, making sending the data somewhere else more easy.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing how plots and figures are represented, then review Scipp's existing .to_dict() behavior and the library's Matplotlib integration. Done means defining and implementing a dict representation containing the specified figure, axes, plot, styling, and data information, with coverage for conversion to JSON or use by another plotting library.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.