Plotting an array value

Hello @nialda !

I believe an easier way would be to use our Weave Table. In order for this to work, you must opt into Weave 1.0 (as shown in the following screenshot.

Here is a workspace where I logged 100 steps of wandb.log({"metric": [random.randint(0,100), 5, 6]}) in one run and graphed the x-axis as step and the y-axis as the first item in the list.

Here are the steps to creating the Table:

  1. Press Add Panel → Weave
  2. For the query, write in runs.history.concat. This will make a table of log history.
  3. Go to the bottom right of the panel and select Columns and make sure that only _step and metric is chosen
  4. Press the Gear in the top right of the Panel. This should open up your settings. For the X Dim, write in row["_step"] and for the Y Dim write in row["metric"][0]. This will make a scatterplot. In order to change this to a line plot, change the Mark into a line.

Your resulting Line Graph should look like the image above. I have included the Weave Panel Settings for ease.

Hope this helps!