Skip to content

Log plots and charts#

The upload method generally works for uploading any file-like object to Neptune.

import neptune
run = neptune.init_run()

fig = ...
run["chart"].upload(fig)

run["plot"].upload("my_plot_file.webp")

Below are some specific tips, depending on what kind of library or data type you're working with.


Working with some plotting library? → Upload the figure object directly.

fig = plt.figure(figsize=(7, 9))
...

run["matplotlib-fig"].upload(fig)

Related

To learn how to log single figure objects or create a series of them, see Log images.


Got an interactive chart to visualize? → Try uploading the figure object directly, or use File.as_html().

from neptune.types import File

fig = ...
run["visuals/matplotlib-fig"].upload(File.as_html(fig))

Related

For more examples, see Log interactive charts and visualizations.


Got a custom chart that you're not sure how to log? → Just upload the chart as any other file.

run["train/custom_chart"].upload("custom_chart.png")

Related