Python - Using Seaborn and Matplotlib to Create a Scatter Chart
by matt392 in Circuits > Software
72 Views, 1 Favorites, 0 Comments
Python - Using Seaborn and Matplotlib to Create a Scatter Chart



print("This program will plot the Orbital Period of a planet vs. its mass.") print("Importing the seaborn and pyplot libraries.") import seaborn as seaborntest import matplotlib.pyplot as pyplottest print("Getting the planetary data from the Seaborn data repo:") print("https://github.com/mwaskom/seaborn-data") testdataset = seaborntest.load_dataset("planets") print("The planet dataset is (doubleclick to expand): ") print(testdataset) print ("Generating the regplot.") seaborntest.regplot(x="orbital_period", y="mass", data=testdataset) print ("Send the regplot that was just generated to the screen.") pyplottest.show()