FlashKeepers

Data Science · College · College and University

Matplotlib and Seaborn

Figure and axes, plot types, customization, subplots, seaborn statistical plots and choosing the right chart.

About this set

35 basic cards for College Data Science. It opens with "What is a Figure in Matplotlib?" and "What is an Axes object in Matplotlib?". Study it alongside the other College sets below.

35 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is a Figure in Matplotlib?
Show answerThe overall window or page that contains plot axes, subplots, and decorative elements.
What is an Axes object in Matplotlib?
Show answerA single plot area with its own coordinate system, axis labels, and title.
How do you create a Figure and Axes together?
Show answerUse fig, ax = plt.subplots()
What method returns the current Axes object?
Show answerplt.gca(), which stands for get current axes.
What function creates a line plot?
Show answerplt.plot() or ax.plot()
What function creates a scatter plot?
Show answerplt.scatter() or ax.scatter()
How do you create a bar chart?
Show answerplt.bar() or ax.bar()
What function creates a histogram?
Show answerplt.hist() or ax.hist()
What is a box plot used for?
Show answerDisplaying the distribution of data with quartiles, median, and outliers.
How do you create a pie chart?
Show answerplt.pie() or ax.pie()
What function displays a 2D grid of color-coded values?
Show answerplt.imshow() or ax.imshow()
How do you create a contour plot?
Show answerplt.contour() for line contours or plt.contourf() for filled contours.
What parameter sets the x-axis label?
Show answerUse ax.set_xlabel('text') or plt.xlabel('text')
How do you set a plot title?
Show answerax.set_title('text') or plt.title('text')
What parameter changes the line color in plt.plot()?
Show answerThe 'color' parameter, e.g., color='red', or shorthand c='r'.

20 more cards in the app

Study this set free