Unique PlotID#

To make the JSON data Findable ( FAIR data ), Plot Serializer can be used in conjunction with the PlotID project. PlotID takes a matplotlib figure and returns a unique identifier for it.

from plot_serializer.matplotlib.serializer import MatplotlibSerializer
from plotid.tagplot import tagplot

serializer = MatplotlibSerializer()
fig, ax = serializer.subplots()

ax.plot([1, 2, 3, 4], [1, 4, 9, 16])
figs_and_ids = tagplot(fig, "matplotlib")
serializer.add_custom_metadata_figure({"PLOT_ID" : figs_and_ids.figure_ids[0]})