Course Name: Python for Trading: Basic, Section No: 8, Unit No: 12, Unit type: Notebook
Qn.15)
Not able to understand how this figure(x,y) works. x is breadth and y is length. In the line it is mentioned as (10,5), but the x-axis and y-axis are showing different dimentions? please clarify
Hi Jeyaraman,
The standard figure size unit in Matplotlib is inches (same as the print industry standard)
So, figsize indicates the width and height of the figure in inches. These are the dimensions you get when you print the image.
The numbers you see on the x-axis and y-axis are not the image's dimensions. They are called x-ticks and y-ticks. The x-ticks represent x-values of the plot, and y-ticks represent the y-values of the plot.
In the notebook, we plotted daily returns of Infosys over 495 days. So, y-ticks represent the daily returns value of Infosys and x-ticks represent the day number.
Thank you