# Log multiple variables at the same plot

**URL:** <https://community.wandb.ai/t/log-multiple-variables-at-the-same-plot/2474>\
**Category:** W&B Help\
**Created:** [May 22, 2022, 2:05am UTC](https://community.wandb.ai/t/log-multiple-variables-at-the-same-plot/2474 "2022-05-22T02:05:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steliostavroulakis](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@steliostavroulakis](https://community.wandb.ai/u/steliostavroulakis)\
**Post date:** [May 22, 2022, 2:05am UTC](https://community.wandb.ai/t/log-multiple-variables-at-the-same-plot/2474/1 "2022-05-22T02:05:44Z")

</div>

Hello there, I would like to log two different variables to show up on the same chart. I use the following:

```auto
for I in range(100):
    var1 = something
    var2 = something_else

    wandb.log({"var1":something, "var2":something_else})

```

but for some reason, the dashboard shows it as two separate plots. I went through the documentation I see this:  
Multiple metrics on one chart: Log multiple metrics in the same call to wandb.log, like this:

`wandb.log({"acc'": 0.9, "loss": 0.1})`

and they will both be available to plot against in the UI.

Can anyone help me on this? I tried many hacks like insertring a list in the place of the variable, or a dict of dicts, etc…

Thanks!

---

<div class="post-metadata">

**Author:** ![armanharutyunyan](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@armanharutyunyan](https://community.wandb.ai/u/armanharutyunyan)\
**Post date:** [May 23, 2022, 10:54am UTC](https://community.wandb.ai/t/log-multiple-variables-at-the-same-plot/2474/2 "2022-05-23T10:54:25Z")

</div>

Hey there, you’ll need to edit one of the charts to include the other metrics manually in the UI. I’ll edit the documentation to make this more clear. Here is an example:  
 ![May-23-2022 14-53-44](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/c0855646bcca0e8b6f621e2da9d9a2e57f80b7e9.gif)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [July 22, 2022, 10:55am UTC](https://community.wandb.ai/t/log-multiple-variables-at-the-same-plot/2474/3 "2022-07-22T10:55:12Z")

</div>

Closed on July 22, 2022, 10:55am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
