History for plots

Hi @ramit_goolry, following up on the feture request you created in There is not history when logging wandb.plot.bar? - #6 by ramit_goolry. What is the best way to log plots with an iteration slider/history in December 2023? :slight_smile:

Hi @demerzel , happy to help. I will look into this and circle back with my findings on current status of this feature. Thanks!

Hi @demerzel ,

The current recommended approach is still the same, a user can log individual plots to plotly or to a wandb.Image to visualize the plots via a step slide. An example of this below

import wandb
import matplotlib.pyplot as plt

# Initialize a new run

# Example loop to simulate iterations
for step in range(10):
    # Create a plot for the current iteration
    fig, ax = plt.subplots()
    ax.plot([0, 1, 2], [0, step, step**2])  # Example data that changes with iteration
    ax.set_title(f"Iteration {step}")
    # Log the plot with the current step
    wandb.log({"plot": fig}, step=step)
    # Close the figure to prevent it from being displayed in the notebook

# Finish the run

Please let me know if you have any questions.

Hi @demerzel , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

Hello! is there any update on this to create plots with sliders instead of matplotlib/plotly plots?