IniziaInizia gratis

Is latitude related to months open?

While exploring the farmers market dataset with a scatter matrix, you noticed a potentially interesting relationship between a market's latitude and the number of months it stays open. Digging into this relationship a bit further, you decide to use Seaborn's regression plot to see if there's any weight to this pattern or if the heavy overlap of the points is playing tricks on your eyes.

To make the regression line stand out, you'll want to lower the overlapping background points opacity and color them a muted gray. Since you're not going to be making any formal inference and want to quickly investigate a pattern, you can turn off the default uncertainty band.

Questo esercizio fa parte del corso

Improving Your Data Visualizations in Python

Visualizza il corso

Istruzioni dell'esercizio

  • Set the scatter plot's points opacity to 10% and color them 'gray'.
  • Disable the default confidence interval band.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

sns.regplot(x = 'lat', 
            y = 'months_open', 
            # Set scatter point opacity & color
            ____ = {'alpha':____, 'color':'____'}, 
            # Disable confidence band
            ____ = ____, 
            data = markets)

plt.show()
Modifica ed esegui il codice