Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matplotlib SANTHOSH Boggarapu.

Similar presentations


Presentation on theme: "Matplotlib SANTHOSH Boggarapu."— Presentation transcript:

1 Matplotlib SANTHOSH Boggarapu

2 Structure of Matplotlib
Matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib is the whole package; pylab is a module in matplotlib that gets installed alongside matplotlib; and matplotlib.pyplot is a module in matplotlib Pyplot provides the state-machine interface to the underlying plotting library in matplotlib. Pylab combines the pyplot functionality (for plotting) with the numpy functionality (for mathematics and for working with arrays) in a single namespace, making that namespace (or environment) even more MATLAB-like. For example, one can call the sin and cos functions just like you could in MATLAB, as well as having all the features of pyplot.

3 What we are going to learn
3D plots Live graphs Sub plots Geographic plotting on maps

4 3D plot A three-dimensional graph is the graph of a function f(x, y) of two variables, or the graph of a relationship g(x, y, z) among three variables. We can draw all kinds of 3D plots using matplotlib. Let’s draw a 3D scatter plot using matplotlib

5 3D Plots

6 Live Graphs Applications of live graphs are enormous
As a Data Scientist, we come across data in the real world where the data keeps on changing A simple example is something like graphing live stock pricing data or we may need to display the live sensor data Let’s see an example on this

7 Geographical plotting
This functionality helps to Plotting data to a latitude and longitude We will be using Basemap which works along with matplotlib. Basemap works alongside Matplotlib to allow you to plot via latitude and longitude coordinates. You can download the Basemap here: toolkits/basemap-1.0.7/ Basemap provide 24 different map projections and info about each them with some sample code is present in the link below:

8 Azimuthal Equidistant Projection

9 Miller Cylindrical Projection

10 subplots Subplot divides the current figure into rectangular panes that are numbered row wise. Each pane contains an axes object. Subsequent plots are output to the current pane.

11 Representation of subplot in the form of grid 2X1

12 Representation of subplot in the form of grid 2X2

13 More Examples You can find more types of plots with sample code at The plots are categorized into various sections based on the functionality Each category has a number of examples. You can find tutorials on matplotlib at

14 Any Questions?


Download ppt "Matplotlib SANTHOSH Boggarapu."

Similar presentations


Ads by Google