I don’t think I’ve used these commands yet…I just found them while searching to solve your problem. Have you tried without keyword arguments? In specific words:
plt.ylim(30,200)
You may want to drop that 30 down to 20 or 10 depending on the data.
I just scrolled to the top of this thread and read your original post to see the code again.
Have you tried various ranges for the plt.ylim() parameter?
I’ve also noticed that with matplotlib, sometimes the order you call your commands can make a difference (I don’t know why that would be) but it’s worth playing around to see what you see.
Try putting your plt.figure() statement before generating the heatmap. Same goes for plt.ylim()
Kindly mark this as done (although I don’t think either of us knows why exactly! )
In case you’re curious, I saw this “order of operations” behaviour when I did one of the first missions in Exploratory Data Visualization and I even posted about it in the forums but never really figured out why the order would matter. Best I could figure out is that default settings/objects/widgets/gremlins were being over written between/before/after fig instantiation and the plot being generated.
In any event, are you good now? Plot looks good? Can you post it for me?
The numbers cut off thing is definitely an issue with matplotlib ver 3.1.1 and so rolling back or updating seems to be the fix for that. Do you know what version you’re running?
I decided to try upgrading to the latest version. Wow, what a mess! Not sure exactly which command broke what exactly, but in the end, some *.dll files were lost/corrupted/incorrect version used.
After an hour of running around on Google and Stackoverflow, chasing down one problem only to find another…I finally just ran: conda update --all
It took a while but eventually it completed without error and matplotlib works again! I double checked in Jupyter notebook:
matplotlib.__version__
'3.2.2'
I do not feel comfortable telling you to do something that might break your environment but it appears “update all” is safer than updating matplotlib alone.
That is a lot of time you spent, I appreciate that you went above and beyond.
I have written that command down for future reference.
Yes it could’ve broke, but it did not and it was a risk, but I figured I could just reinstall if it broke.
Thanks again
JB
Thanks, James. Honestly, it was a pleasure. Sure, it was a bit frustrating at times but that just comes with the territory when learning something new. I try to remember: “This too shall pass”
I only have a little over a month’s worth of experience with python but I have a lifetime’s worth of problem solving in general. As my abstract algebra prof once told me: “Mike, you’re not the smartest person in the room, but you are the most relentless!”
That’s a great background for this type of work.
Abstract algebra sounds really hard, but no doubt
sharpens your problem solving skills.
Relentless indeed!
Hard work beats talent when talent does not work hard.
Surround yourself with the dreamers, the doers, the believers, and thinkers; but most of all surround yourself with those who see greatness within you even when you don’t see it yourself.