How to create a scatter plot and histogram using pandas and matplotlib

Tracyrenee
Geek Culture
Published in
4 min readSep 9, 2021

--

In my most recent post I discussed my most recent post on how to be able to read a json file in pandas, I discussed how Francis Anscombe was given the dataset in a dream. This dataset had very similar statistical properties, but when they were plotted on a graph all four datasets presented different appearances. The lesson learned from this dataset was that data scientists need to plot the data points on a graph to see what they look like before analysing them through computational means. The link to my most recent post where I discussed the Anscombe dataset can be found here:- https://medium.com/geekculture/how-to-read-a-json-file-in-python-ac63d2042577

Because it is so important to plot the points on a dataset before analysing it, it is important to know how to do this. Pandas has a whole page dedicated to plotting graphs, and the page can be found here:- https://pandas.pydata.org/pandas-docs/stable/user_guide/visualization.html

I thought it would be a good idea to plot the points on the Portland, Oregon housing prices dataset because it is small and easy to use. The link to the Portland, Oregon dataset can be found here:- https://www.kaggle.com/kennethjohn/housingprice

I initially had to create a Jupyter Notebook to be able to plot the points of the Portland dataset on a…

--

--

Tracyrenee
Geek Culture

I have five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.