English

Write short notes on different customisation options available with any plot.

Advertisements
Advertisements

Question

Write short notes on different customisation options available with any plot.

Short Answer
Advertisements

Solution

  1. Titles & Labels:
    1. plt.title(): Adds a main heading at the top.
    2. plt.xlabel(): Sets the horizontal x-axis label.
    3. plt.ylabel(): Sets the vertical y-axis label.
  2. Line & Marker Styling:
    1. color: Changes line or bar colors (e.g., 'red', 'g').
    2. linestyle: Changes line appearance (e.g., 'dashed', 'dotted').
    3. linewidth: Adjusts the thickness of the line.
    4. marker: Adds symbols to data points (e.g., 'o', '*').
  3. Grid & Legend:
    1. plt.grid(True): Displays background lines for easier reading.
    2. plt.legend(): Adds a key to identify multiple data series.
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: Plotting Data using Matplotlib - Exercise [Page 134]

APPEARS IN

NCERT Informatics Practices [English] Class 12
Chapter 4 Plotting Data using Matplotlib
Exercise | Q 4. | Page 134
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×