MOBI BOOT CAMP CORP. logoLearning Buddy
  • SIGN IN
  • Introduction
  • 1: NumPy Module
  • 2: Pandas Module
  • 3: Pandas - More on Dataframes
  • 4: Matplotlib Module
    • Simple Visualizations
    • Quiz
    • Colab Exercise
  • 5: Seaborn Module
  • 6: Plotly Express Module
  • 7: GeoSpatial Modules
  • 8. Other Popular Libs
  • 9. Data Driven Stories
  • 10. Bad Visualization Example
  • 11. Glossary
  • Slides-1
  • Slides-2

To create your own custom set of plots, you would first create a Figure object and then add as many subplots as you need for your diagram.

True False That is true! Matplotlib gives us fine-grained access to subplots, the type of diagram that can go in every subplot, and many other individual settings that are not possible with higher-level diagramming tools.

Assuming `plt` is the alias for Matplotlib, to create a Figure object, you would invoke:

fig = plt.figure() plt.plot() plt.getfigure() `plt.figure()` returns a Figure object.

Assuming `fig` is a Figure object, you can add multiple subplots to this Figure by invoking:

fig = plt.figure() fig.add_subplot(row, column, position) Yes, the row and column information provides the number of rows and columns for the subplot layout, and the subplot that is added in this statement will occupy the place based on the position.

Exercise

Privacy Policy | Terms & Conditions