# Adjust linestyle and colours based on parameters

**URL:** <https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500>\
**Category:** W&B Help\
**Created:** [April 23, 2024, 3:09pm UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500 "2024-04-23T15:09:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dngfra](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dngfra](https://community.wandb.ai/u/dngfra)\
**Post date:** [April 23, 2024, 3:09pm UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/1 "2024-04-23T15:09:29Z")

</div>

Hello!

I am trying to do something as simple as setting the colour and linestyle of different runs in one experiment based on one or more parameters and having a correspondence in the legend, but this doesn’t seem to be straightforward at all.

Is there any way to do this?

Thanks

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [April 25, 2024, 11:49am UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/2 "2024-04-25T11:49:21Z")

</div>

Hey @dngfra, thanks for writing in! Would you mind sharing a link to your project so I can take a look?

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [April 30, 2024, 11:25am UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/3 "2024-04-30T11:25:06Z")

</div>

Hey @dngfra, following up here! Would you have any problems with sharing a link to your workspace? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dngfra](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dngfra](https://community.wandb.ai/u/dngfra)\
**Post date:** [April 30, 2024, 12:18pm UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/4 "2024-04-30T12:18:47Z")

</div>

Hi! Thanks for the reply!

I recreated my issue in this toy project: `https://wandb.ai/tml-dngfra/Test%20MLP?nw=nwuserdngfra` but I can’t make it public as under project visibility the only available options are Private or Restricted. How can I make it public?

thanks!

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [April 30, 2024, 2:59pm UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/5 "2024-04-30T14:59:37Z")

</div>

Thanks @dngfra! Don’t worry, I should be able to view it but not totally sure of what you are trying to do here. Are you trying to modify the color of lines in a Query Panel?

---

<div class="post-metadata">

**Author:** ![dngfra](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dngfra](https://community.wandb.ai/u/dngfra)\
**Post date:** [May 1, 2024, 8:41am UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/6 "2024-05-01T08:41:28Z")

</div>

Thanks for the reply!

As you can see in the config table, the experiment involves various hyperparameters. I’m trying to understand their interactions and effects on training. For instance, I have different values for weight decay, batch sizes, and number of layers. Currently, when viewing the plots, it’s challenging to understand the effect of a specific parameter since I would have to open and review each run’s configuration separately and remember the colour and linestyle, which isn’t practical. A better approach would be to assign line colors and styles based on certain parameters, with a correspondent updated legend. For example, I would like to set the colors according to the weight decay values of the runs and the line styles based on the batch sizes. Perhaps we could even have separate plots for a third parameter, like the number of layers. I tried to achieve something similar using the query plots, but it does not seem to work. Is there a way to implement this?

Thanks!

---

<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:** [May 3, 2024, 6:44pm UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/7 "2024-05-03T18:44:18Z")

</div>

Dear Francesco,

Stepping in here as Luis is away just now.

Thanks for clarifying this detail while some of the use case you described is addressed by either running a compare panel or parallel coordinates plot the exact functionality you described is not possible.

I have shared screengrabs for using both parameter importance and parallel coordinates plots which we have designed for being able to see the importance of particular parameters and recommend to our users for the type of use case you describe.

I am happy to log a feature request regarding the run colors setting (would you want this by the final value of the summary).

Regarding a more complex/customer approach I wonder if something like our ability to log with plotly/matplotlib here would work for you?

Look forward to hearing back.

Best wishes,

Frida

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [May 9, 2024, 9:32am UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/8 "2024-05-09T09:32:47Z")

</div>

Hi Francesco, attaching the screenshots mentioned in the previous message

 ![Screenshot 2024-05-03 at 19.22.42](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/e/e8d55da67eb04bd28876941b9d52ac4a2b6e9854.png)

 ![Screenshot 2024-05-03 at 19.16.56](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/9/949fc353ace59ae1db5232b67e67f455996807be.jpeg)

Please let us know if we can be of further assistance or if your issue has been resolved.

---

<div class="post-metadata">

**Author:** ![luis\_bergua](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@luis\_bergua](https://community.wandb.ai/u/luis_bergua)\
**Post date:** [May 16, 2024, 10:42am UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/9 "2024-05-16T10:42:30Z")

</div>

Hi Francesco, 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:** ![ma-hassan](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@ma-hassan](https://community.wandb.ai/u/ma-hassan)\
**Post date:** [August 25, 2024, 8:32pm UTC](https://community.wandb.ai/t/adjust-linestyle-and-colours-based-on-parameters/6500/10 "2024-08-25T20:32:54Z")

</div>

+1  
Highly useful feature.  
Maybe a third (say, z-axis) can be added to the line plot to color each line.  
It would be even better if we could color each run globally based on some config key.  
Thanks.
