# History for plots

**URL:** <https://community.wandb.ai/t/history-for-plots/5619>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [December 29, 2023, 9:03pm UTC](https://community.wandb.ai/t/history-for-plots/5619 "2023-12-29T21:03:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![demerzel](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@demerzel](https://community.wandb.ai/u/demerzel)\
**Post date:** [December 29, 2023, 9:03pm UTC](https://community.wandb.ai/t/history-for-plots/5619/1 "2023-12-29T21:03:58Z")

</div>

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](https://community.wandb.ai/t/there-is-not-history-when-logging-wandb-plot-bar/3203/6). What is the best way to log plots with an iteration slider/history in December 2023? 🙂

---

<div class="post-metadata">

**Author:** ![mohammadbakir](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mohammadbakir](https://community.wandb.ai/u/mohammadbakir)\
**Post date:** [January 5, 2024, 6:44pm UTC](https://community.wandb.ai/t/history-for-plots/5619/2 "2024-01-05T18:44:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mohammadbakir](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mohammadbakir](https://community.wandb.ai/u/mohammadbakir)\
**Post date:** [January 8, 2024, 7:55pm UTC](https://community.wandb.ai/t/history-for-plots/5619/3 "2024-01-08T19:55:37Z")

</div>

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

```auto
import wandb
import matplotlib.pyplot as plt

# Initialize a new run
wandb.init(project="visualize-iterations")

# 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
    plt.close(fig)

# Finish the run
wandb.finish()

```

Please let me know if you have any questions.

---

<div class="post-metadata">

**Author:** ![mohammadbakir](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mohammadbakir](https://community.wandb.ai/u/mohammadbakir)\
**Post date:** [January 11, 2024, 1:51am UTC](https://community.wandb.ai/t/history-for-plots/5619/4 "2024-01-11T01:51:05Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![rjavierch](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/rjavierch/32/1742_2.png) [@rjavierch](https://community.wandb.ai/u/rjavierch)\
**Post date:** [April 1, 2024, 8:52am UTC](https://community.wandb.ai/t/history-for-plots/5619/5 "2024-04-01T08:52:03Z")

</div>

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