{"id":6281,"date":"2021-03-08T10:00:27","date_gmt":"2021-03-08T10:00:27","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=6281"},"modified":"2024-03-26T07:41:13","modified_gmt":"2024-03-26T07:41:13","slug":"python-matplotlib","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/","title":{"rendered":"Python Matplotlib"},"content":{"rendered":"\r\n<h3><span data-sheets-root=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Python Matplotlib for Beginners&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:513,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0}\">Python Matplotlib for Beginners<\/span><\/h3>\r\n<p>&nbsp;<\/p>\r\n<p><strong>Prerequisites<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Hardware : Local Machine<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Software : Jupyter Notebook<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Programming Language : Python <\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Definition:<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Matplotlib is a cross-platform, data visualization and graphical plotting for Python.<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Jupyter Notebook Introduction:<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Jupyter<\/strong>\u00a0is a free, open-source, interactive web tool which known as a computational\u00a0<strong>notebook<\/strong>, which anybody can\u00a0<strong>use<\/strong>\u00a0to combine software code to get the computational output, explanatory text in a single document.<\/p>\r\n\r\n\r\n\r\n<p><strong>PLOT A LINE IN Matplotlib:<\/strong><\/p>\r\n\r\n\r\n\r\n<p>You can run the following code in <strong>Jupyter Notebook:<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Click this link to open Jupyter Notebook &#8211; <a href=\"https:\/\/jupyter.org\/\">https:\/\/jupyter.org\/<\/a><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"380\" class=\"wp-image-6947\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png 433w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647-300x263.png 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>plt.plot() &#8211;<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function which is used to plot the points between x and y.<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.show()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Function which shows the plot.<\/p>\r\n\r\n\r\n\r\n<p>What is Matplotlib?<\/p>\r\n\r\n\r\n\r\n<p><code><code><\/code><\/code><strong>matplotlib.pyplot<\/strong>\u00a0is a collection of command style functions which makes matplotlib work like MATLAB<\/p>\r\n\r\n\r\n\r\n<p>Each\u00a0<code>pyplot<\/code>\u00a0function can make any changes to a figure. For example It can create a figure, It can also create a plotting area in the figure, A function which plots some lines in a plotting area<\/p>\r\n\r\n\r\n\r\n<p><strong>\u00a0What is Pyplot? <\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Pyplot package can be considered as\u00a0<code>plt<\/code>.<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>SIMPLE PLOT:<\/strong><\/p>\r\n\r\n\r\n\r\n<p>\u00a0Let&#8217;s display a simple line plot by using the math module which uses mathematical functions.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference<strong> Simple Plot<\/strong>:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"462\" class=\"wp-image-6948\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-649.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-649.png 470w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-649-300x295.png 300w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>What is Numpy?<\/p>\r\n\r\n\r\n\r\n<p>NumPy is a module for the Python programming language for large multi-dimensional arrays and matrices<\/p>\r\n\r\n\r\n\r\n<p><strong>import numpy as np<\/strong> &#8211; In simple terms making short &#8220;<strong>numpy<\/strong>&#8221; to &#8220;<strong>np<\/strong>&#8221; to make your code easier to read.<\/p>\r\n\r\n\r\n\r\n<p><strong>import math<\/strong> &#8211; . The math module uses mathematical functions<\/p>\r\n\r\n\r\n\r\n<p><strong>np.arrange()<\/strong> &#8211;<\/p>\r\n\r\n\r\n\r\n<p><strong>NumPy\u00a0<code>arange()<\/code><\/strong> Creation of an array using routines based on numerical ranges. It is also for <strong>Setting the coordinates<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>np.sin() &#8211; <\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is a mathematical function which helps user to calculate trignometric\u00a0<strong>sine<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.plot() &#8211;<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function which is used to plot the points between x and y.<\/p>\r\n\r\n\r\n\r\n<p><strong>MULTI PLOT:<\/strong><\/p>\r\n\r\n\r\n\r\n<p>This allows to draw multiple graphs in a single plot.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">\u00a0<\/h2>\r\n\r\n\r\n\r\n<p>A subplot () function is known as wrapper function which allows user to plot more than one graph in a single figure<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Multi Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"459\" class=\"wp-image-6958\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-651.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-651.png 452w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-651-295x300.png 295w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>plt.plot([1, 2, 3)]<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Plot a line, Implicitly creating a subplot<\/p>\r\n\r\n\r\n\r\n<p><strong>What is a Subplot?<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Subplots can connect to main plots.<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.subplot(211)<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Creation of a subplot that represents the top plot of a grid with 2 rows and 1 column.<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.subplot(212, facecolor=&#8217;y&#8217;)<\/strong><\/p>\r\n\r\n\r\n\r\n<p>As we can see it creates 2nd subplot with yellow background<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"408\" class=\"wp-image-6960\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-653.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-653.png 449w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-653-300x273.png 300w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">\u00a0<\/pre>\r\n\r\n\r\n\r\n<p><strong>BAR PLOT:<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A bar graph is the visualization which shows the comparison among discrete categories. X axis of the chart shows the categories which are compared, and Y axis represents a measured value.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for reference for <strong>Bar Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"449\" class=\"wp-image-6965\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-655.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-655.png 617w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-655-300x218.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>fig = plt.figure()<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>figure()<\/strong>\u00a0A function which is used to create a\u00a0figure\u00a0object.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">\u00a0<\/pre>\r\n\r\n\r\n\r\n<p><strong>ax = fig.add_axes<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>\u00a0<\/strong>It is a figure module of matplotlib which is used to add axes to the figure.<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.bar()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A\u00a0module of matplotlib is used to make a bar plot.<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.show()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Function to show the plot.<\/p>\r\n\r\n\r\n\r\n<p><strong>HISTOGRAM:<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A histogram represents the numerical data. It is also known as the other form of Bar Graph.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Histogram:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"461\" class=\"wp-image-6968\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-657.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-657.png 507w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-657-300x273.png 300w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>np.array()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function which includes Array elements<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.hist()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is an essential function that is to plot a histogram graph.<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.set()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function which is know to be a property, In other words it is a batch setter, Be it Title set or a Label Set<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.show()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function to show the plot.<\/p>\r\n\r\n\r\n\r\n<h3><strong>PIE CHART:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>A Pie Chart displays one series of data. Pie charts shows the size of subjects in one data series in different divisions, The data points are shown in percentage in a Pie chart.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Pie Chart:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"455\" class=\"wp-image-6974\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-659.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-659.png 540w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-659-300x253.png 300w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>import numpy as np<\/strong><\/p>\r\n\r\n\r\n\r\n<p>In simple terms making short &#8220;<strong>numpy<\/strong>&#8221; to &#8220;<strong>np<\/strong>&#8221; to make your code easier to read.<\/p>\r\n\r\n\r\n\r\n<p><strong>fig = plt.figure()<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong><strong>figure()<\/strong> A function which is to create a figure object.<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>ax.pie<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function of Matplotlib library which is to plot a pie chart Graph.<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.show()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function to show the plot.<\/p>\r\n\r\n\r\n\r\n<p>Matplotlib &#8211; <strong>Scatter Plot<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Scatter plots are knows to be of plotting data points on horizontal and vertical axis in the attempt to show how much one variable is affected by another.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/805\/1*aUSZsGFCMPNYCkQygs4aGQ.jpeg\" alt=\"Matplotlib: Quick and pretty (enough) to get you started. | by Dorjey  Sherpa | Medium\" \/><\/figure>\r\n\r\n\r\n\r\n<p>A scatter plot is a diagram which is displayed in a graphical format where each value in the data set is represented by a single dot.<\/p>\r\n\r\n\r\n\r\n<p>Here is a program for the reference <strong>Scatter Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"556\" class=\"wp-image-6976\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-661.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-661.png 561w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-661-300x297.png 300w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-661-150x150.png 150w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>fig = plt.figure()<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong><strong><strong>figure()<\/strong> A function which is to create a figure object.<\/strong><\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>ax = fig.add_axes()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>To add the coordinates<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.scatter<\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is a module of Matplotlib library which is to plot a scatter plot graph.<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.set_title()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>To set the Title on the Top of the Graph<\/p>\r\n\r\n\r\n\r\n<h4><strong>CONTOUR PLOT<\/strong><\/h4>\r\n\r\n\r\n\r\n<p>Contour plots displays a 3 dimensional surface on 2 &#8211; dimensional plane.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Contour Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"494\" class=\"wp-image-6979\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-663.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-663.png 439w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-663-267x300.png 267w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>np.linespace<\/strong><\/p>\r\n\r\n\r\n\r\n<p>The <strong>np<\/strong>.\u00a0<strong>linspace<\/strong> is a tool in Python for creating numeric sequences. It is kind of similar to np.arrange() function.<\/p>\r\n\r\n\r\n\r\n<p><strong>np.meshgrid<\/strong><\/p>\r\n\r\n\r\n\r\n<p>The\u00a0<code>numpy.meshgrid<\/code>\u00a0function is used to create a rectangular grid out of two given 1 &#8211; dimensional arrays.<\/p>\r\n\r\n\r\n\r\n<p><strong>np.sqrt<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A Function which is to determine the positive square-root of an array, in a specific way, element-wise.<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.contour<\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is a function of matplotlib is to Plot contours. <strong>contour<\/strong>draw contour lines.<\/p>\r\n\r\n\r\n\r\n<p><strong>fig.colorbar(cp)<\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is a function of matplotlib is\u00a0 to add a color bar to a plot.<\/p>\r\n\r\n\r\n\r\n<p><strong>ax.set_title()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>To set the Title on the Top of the Graph<\/p>\r\n\r\n\r\n\r\n<p><strong>plt.show()<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A function to show the plot.<\/p>\r\n\r\n\r\n\r\n<p><strong>QUIVER PLOT<\/strong><\/p>\r\n\r\n\r\n\r\n<p>A quiver plot displays the velocity vectors as arrows with components.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">\u00a0<\/pre>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Quiver Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"542\" height=\"394\" class=\"wp-image-7121\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-671.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-671.png 542w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-671-300x218.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p><strong>VIOLIN PLOT<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>Violin plots<\/strong> are identical to box plots, exception is that they also show the probability density of the data at different pace of values.<\/p>\r\n\r\n\r\n\r\n<p>A violin plot is much more informative than a plain box plot.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Violin Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"548\" height=\"551\" class=\"wp-image-7122\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-673.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-673.png 548w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-673-298x300.png 298w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-673-150x150.png 150w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p><strong>3 D CONTOUR PLOT<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong> ax.contour3D() <\/strong><\/p>\r\n\r\n\r\n\r\n<p>It is a function creates three-dimensional contour plot.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>3D Contour Plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"343\" class=\"wp-image-7123\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-675.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-675.png 396w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-675-300x260.png 300w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Output:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"543\" class=\"wp-image-6326\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-604.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-604.png 635w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-604-300x257.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>3D WIREFRAME PLOT<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Wireframe plot takes a grid of values and projects it onto the specified three-dimensional surface<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>3D Wireframe plot:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"291\" class=\"wp-image-7124\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-678.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-678.png 398w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-678-300x219.png 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Output:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"548\" class=\"wp-image-6330\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-608.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-608.png 639w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-608-300x257.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>GRIDS<\/strong><\/p>\r\n\r\n\r\n\r\n<p>The grid() function of axes object sets visibility of grid inside the figure to on or off.<\/p>\r\n\r\n\r\n\r\n<p>Here is the program for the reference <strong>Grids:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"245\" class=\"wp-image-7126\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-680.png\" alt=\"\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-680.png 441w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-680-300x167.png 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<p><strong>Output:<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6333\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-612-1024x405.png\" alt=\"\" width=\"684\" height=\"270\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-612-1024x405.png 1024w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-612-300x119.png 300w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-612-768x304.png 768w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-612.png 1192w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Python Matplotlib for Beginners &nbsp; Prerequisites Hardware : Local Machine Software : Jupyter Notebook Programming Language : Python Definition: Matplotlib is a cross-platform, data visualization and graphical plotting for Python. Jupyter Notebook Introduction: Jupyter\u00a0is a free, open-source, interactive web tool which known as a computational\u00a0notebook, which anybody can\u00a0use\u00a0to combine software code to get the computational [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,1676],"tags":[],"class_list":["post-6281","post","type-post","status-publish","format-standard","hentry","category-machine-learning","category-python-data-visualization"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python Matplotlib for Beginners - Prwatech<\/title>\n<meta name=\"description\" content=\"Master Python Matplotlib for Beginners - Prwatech - Dive deep with our expert instructors and comprehensive curriculum.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Matplotlib for Beginners - Prwatech\" \/>\n<meta property=\"og:description\" content=\"Master Python Matplotlib for Beginners - Prwatech - Dive deep with our expert instructors and comprehensive curriculum.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-08T10:00:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T07:41:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/\",\"url\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/\",\"name\":\"Python Matplotlib for Beginners - Prwatech\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png\",\"datePublished\":\"2021-03-08T10:00:27+00:00\",\"dateModified\":\"2024-03-26T07:41:13+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Master Python Matplotlib for Beginners - Prwatech - Dive deep with our expert instructors and comprehensive curriculum.\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png\",\"width\":433,\"height\":380},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Matplotlib\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Matplotlib for Beginners - Prwatech","description":"Master Python Matplotlib for Beginners - Prwatech - Dive deep with our expert instructors and comprehensive curriculum.","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Python Matplotlib for Beginners - Prwatech","og_description":"Master Python Matplotlib for Beginners - Prwatech - Dive deep with our expert instructors and comprehensive curriculum.","og_url":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2021-03-08T10:00:27+00:00","article_modified_time":"2024-03-26T07:41:13+00:00","og_image":[{"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png","type":"","width":"","height":""}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/","url":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/","name":"Python Matplotlib for Beginners - Prwatech","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png","datePublished":"2021-03-08T10:00:27+00:00","dateModified":"2024-03-26T07:41:13+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Master Python Matplotlib for Beginners - Prwatech - Dive deep with our expert instructors and comprehensive curriculum.","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-647.png","width":433,"height":380},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/python\/python-data-visualization\/python-matplotlib\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Matplotlib"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/6281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=6281"}],"version-history":[{"count":49,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/6281\/revisions"}],"predecessor-version":[{"id":11107,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/6281\/revisions\/11107"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=6281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=6281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=6281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}