cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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?

5 REPLIES 5

Debayan
Databricks Employee
Databricks Employee

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
Databricks Employee
Databricks Employee

@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

aleph_null
New Contributor II

Any updated on this issue? This is a huge drawback to use the dark theme

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group