Medical Data Visualizer need help

Tell us what’s happening:
Having trouble passing the project.
I currently ran it on personal jyputerlab
With the help of forums and some other source, I managed to create both images within my lab and the repl.it.
However, I have no idea where my errors are.

  1. I followed one of the forum to delete and reinstall my packages.
  2. My 2nd chart didnt follow exactly the same as the fig.2 as I dont see cbar_kws is the matter here.

Your code so far
https://repl.it/@WenYuHo/fcc-medical-data-visualizer

Challenge: Medical Data Visualizer

Link to the challenge:

1 Like

sns.catplot() doesn’t return figure object, but FacetGrid, figure can be accessed from it by using the fig attribute.

Second issue lies within one of the dependency. Keep in mind that I don’t know whether this is a bug introduced in newer version or whether behavior changed because some bug was fixed. Nevertheless to remedy the problem in poetry.lock file, changing version for the matplotlibto the 3.2.2 and re-running repl.it should make error stop occurring.

1 Like

Thank you!

God…I actually read your previous reply and didn’t know it was the same issue…
Since my original code? saving the face_grid to png works …I assuming this is the limitation of the test module…Or actually is encouraged to save it into matplotlib.figure.Figure ?

As for the number 3.2.2, I think the issue is beyond just that now. Since i deleted these packages and reinstalled them, i think it might be the cause. So I re-fork the project to start fresh and add the “description” and “3.2.2” adjustment and it actually create new issues.
Thankfully I had the project download from 4 days ago…and I was finally able to get “OK” on my juypterlab.
So I simply copy and replace both file of Repl.it to have it reinstall everything into older version

Test just expected something else than what sns.catplot() actually returns. It has savefig() method, that allows saving plot, but the figure that test wants is a bit deeper.

How did you reinstall matplotlib into version 3.2.2.
When I try doing it I keep getting the error
“[SolverProblemError]
Because fcc-medical-data-visualizer depends on matplotlib (^3.3.0) which doesn’t match any versions, version solving failed.
exit status 1”

umm I not familiar with this but i think you can try to use these two dependency file instead of whats provided. I dont think i;m breaking any honor code as this is not what we are tested on. However, I will delete right away if someone disagree with this.

@WenYuHo Thank you! I got the code to work with the dependency file. Seems like changing it to version 3.2.2 made the error go away.