cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix plots and image color rendering on Notebooks?

wschoi
New Contributor III

I am currently running dark mode for my Databricks Notebooks, and am using the "new UI" released a few days ago (May 2023) and the "New notebook editor."

Currently all plots (like matplotlib) are showing wrong colors.

For example, denoting:

```

...

plt.figure()

plt.axvline(x=0, color='red')

plt.axhline(y=0, color='red')

...

```

is resulting in teal colored axes. Images also seem to have their colors and hues mixed up.

Is there a way to fix this without giving up any of my current settings for the notebook environment?

4 REPLIES 4

Debayan
Esteemed Contributor III
Esteemed Contributor III

Hi, Could you please provide a screenshot of the same which will help us understand it better?

Please tag @Debayan​ with your next comment so that I will get notified. Thank you!

wschoi
New Contributor III

@Debayan Mukherjee​ 

Thanks in advance.

Below is a very simple example of the issue.

I denote the colors "red" for the axes and "blue" for the actual plot, but end up with teal colored axes and a yellow plot.

This is the same for any type of non-text output in the notebook environment, including images, which is the main cause of concern as it can make modeling and other tasks a bit confusing.

Not sure if there is a setting I missed, or if this is some kind of an issue.

image.png

Debayan
Esteemed Contributor III
Esteemed Contributor III

@Wonseok Choi​ thanks for the details. Could you please confirm if you have followed any documents on the same? (https://docs.databricks.com/visualizations/index.html)

leonardoazzi
New Contributor II

Hello all,

Thank you @wschoi for reporting this issue. I've lost a lot of time trying to figure out if my image plotting was wrong.

Captura de tela de 2023-08-09 16-23-29.pngCaptura de tela de 2023-08-09 16-24-03.png