Data Visualization - Graph Display Issue

Screen Link:

https://app.dataquest.io/m/347/working-with-missing-and-duplicate-data/4/visualizing-missing-data
My Code:

Replace this line with your code

What I expected to happen:

What actually happened:

Replace this line with the output/error

I tried to generate the same heat map in my Jupyter notebook , however, the display is bit weird. I am not able to figure out what’s the issue with my notebook. Can someone help me on this please.
Enclosed is the screenshot of the same.


Kindly advise

Thanks
K!

What exactly is the issue that you are facing?

@prasadkalyan05 See problem is that in dataquest.io platform column values are alphabetically sorted and in yours, it isn’t so if you want the same visualization graph, you need to sort column values.

Include this line of code above sns.heatmap() : combined_updated.sort_index(axis=1, inplace=True)

I hope this helps!!

Hi @jenil2452000

I tried applying the same technique . however my point here is why my index labels are not displaying appropriately meaning that in black color

For you reference again, i am posting another visualization where i still see my labels are displaying in black color which is bit difficult to analyse the visualization.

What could be the issue?

Best
K!

Can’t really be sure without looking at your code, but it looks like you have some sort of Dark Mode Theme enabled.

It could either something related to your Notebook installation, or maybe a browser extension interfering with it.

Maybe this might help if it’s something related to the Notebook itself - https://medium.com/@fredriccliver/cant-not-see-axis-label-of-jupyter-notebook-in-the-dark-theme-vscode-df31a3ee121

If you have a browser extension that converts your pages into Dark Mode, then try turning it off and see if that helps.

There doesn’t seem to be any another reason that I could find for this to happen.

See, you can change the color of labels and axis as you wish.

plt.tick_params(axis='x', colors='red')  for changing labels color on x-axis

plt.xlabel('axis_name', color='red') for changing x-axis name color

For better understanding see this answer on stack overflow.

I guess this is what you are looking for!!

1 Like

Awesome. I was looking for the same. It’s like more of customization of your visualization. Initially I thought there is something issue with my dark mode theme but which is not the case here.
Thanks again for your support and help.
Cheers
K!

Hey

I crosschecked but this is not the issue in my case. Anyways thanks for sharing this article. I’ve got to know few more new techniques from it.

Thanks again.
Best
K!