Matplotlib Tutorial 3 - Axes labels, Legend, Grid

preview_player
Показать описание
This matplotlib tutorial covers how to show axes labels, legend and grid on a 2D plot.

Topics that are covered in this Video:
0:00 Intriduction
1:50 Set axes lable in Matplotlib xlable(), ylable() and title()
2:25 Create Legend

Populor Playlist:

Next Video:

Рекомендации по теме
Комментарии
Автор

days = [1, 2, 3, 4, 5, 6, 7]
max_t = [50, 51, 52, 48, 47, 49, 46]
min_t = [43, 42, 40, 44, 33, 35, 37]
avg_t = [45, 48, 48, 46, 40, 42, 41]

Enjoy :)

smitmodi
Автор

Thanks man I searched everywhere how to add a legend, nothing helped like you did. Thanks Again!

ayushjain
Автор

Excellently explained in a very simple way.

prithvirajlohar
Автор

please add a video where you can display plot values in the graph

mazkaibil
Автор

Please make a video on graph intersection points in Matplotlib..

subhabratamondal
Автор

Thank you very much for this video! I learnt a lot from the video :)

tymothylim
Автор

I understand that a 2nd series of data, with it's own scale can be done using twinx..
ax2 = ax1.twinx()

But you can create another spine (with different scaling) for either of the y data using:
ax1b = ax1.secondary_yaxis(-0.25, # places new spine to the left of ax1, good!
ax2b = ax2.secondary_yaxis(-0.25,

But what if you have 3 completely independent series you want to plot, how can you place the 3rd spine (containing the range for that axis) and its legend, to the *LEFT* of ax1?
ax3 = ax1.twinx()
ax3.spines['left'].set_position(('axes', 0.01)) # places new spine to the right of ax1
ax3.spines['left'].set_position(('axes', -1)) # places new spine to the right of the ax2

bennguyen
Автор

can print labels in different colors i.e., in max, 'm' is different color and 'ax' is different color is it possible using the matplotlib?

KummariVenkateshPhDStudent
Автор

Sir if I want to calculate the slope of the graph can I do that in matplotlib. If yes then how can I calculate the slope.

tanoychowdhury
Автор

OK sir tell me one thing what I HV to know to become a junior data Scientist ???
Plzz tell me sir ...
I know Python and it's 3 library that u HV taught . What I HV to know more to become a junior data Scientist ???

milestonecreator
Автор

How can I get a perfect y axis scale (regardless of my x and y data), like here I want it to start from 30, instead of 32.5 and want the numbers evenly spaced, for example - 30, 32, 34, etc.? I tried using xlim and ylim but it doesn't work.

karimazafar
Автор

Sir, why this ""string object is not called " error is arising again and again

TypeError Traceback (most recent call last)
in <module>()
1 plt.title('weather')
----> 2 plt.xlabel("Day")
3 plt.ylabel("tempereture")
4 plt.plot(day, max_t)
5 plt.plot(day, min_t)

TypeError: 'str' object is not callable

milestonecreator
Автор

Hi. When I try to write plt.xlabel("Days"), I'm getting error message as TypeError: 'str' object is not callable. What about this?

BeyazitBestamiYUKSEL
Автор

Sir I have a problem regarding the nomenclature of each plotting
Suppose I run a loop and plt.plot come only once
Then how will I nomenclate each plot
Here u write plt. Plot 3 times and write
Plt. Plot(xx, yy, label=("max")) etc
But how will I write it in a loop where only one time I use plt. plot
I hope u will understand my problem very quickly
I will wait for ur answer
Thank you🙏.

photon
Автор

how can we plot if y-axis numbers are very big like in billions? (without matplotlib auto-scaling to 1, 2, 3?

manuize
Автор

Sir how to remove gridlines in an image

mounicamandavilli
Автор

Brother, how could i Sewer design/profile design (with slop or gradient) easily with Matplotlib in python ? If any vid pl give the link . Thanks.

freshwater
Автор

%matplotlib inline - May I know the purpose of this in a bit clear way.

VineelVishwanth