Guided Project: Visualizing Earnings - no Scatter Graph

Hi guys,

I am having a trouble with creating a scatter graph by using the code in the instruction - in step 2.

It supposes to show the graph immediately but I didn’t get anything, only a line like below;

Could anyone please advise what should I do with this?

many thanks!!

Screen Link: https://app.dataquest.io/m/146/guided-project%3A-visualizing-earnings-based-on-college-majors/2/pandas-scatter-plots

add

plt.show()

in both codes, plt.show() is used to display a figure.


You can also try adding ; at the end of your codes eg.

recent_grads.plot(x='Smaple_size', y='Employed', kind='scatter');

hey Victor, thanks for the suggests, adding a ; after the code not really work, it’s still not showing a graph;

plt.show() doest really work as well, it has the error below:

you’ll have to import matplotlib.pyplt

import matplot.pyplot as plt

yes, just retired, but it is showing below, the same like before, one line:

@g.lcao1992: somtimes this happens. Rerun the cell and it should appear (don’t restart and run all). If it still doesn’t work please share your code (or notebook) with us as per these guidelines, formatting your code with 3 backticks [`] : below the Esc key on a US keyboard. You can also refer to this to share your notebook.

Hey there, thanks for replying;

just figured out, I should have put %matplotlib inline in the first stage;

and now it shows the graph.

thank you :slight_smile:

1 Like