- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Rishikesh Kumar Rishi has Published 1162 Articles
Rishikesh Kumar Rishi
4K+ Views
To add legends and title to grouped histograms generated by Pandas, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a Pandas dataframe with "a", "b", "c" and "d" keys.Plot data frame with kind="hist"Set a title for the axes.To display ... Read More
Rishikesh Kumar Rishi
1K+ Views
To plot scatter points on polar axis in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Initialize a variable, N, for number of sample data.Get r, theta, area and color data using numpyCreate a new figure or activate an ... Read More
Rishikesh Kumar Rishi
2K+ Views
To omit matplotlib printed output in Python/Jupeter notebook, we can take the following steps −import numpy as np.from matplotlib import pyplot as pltCreate points for x, i.e., np.linspace(1, 10, 1000)Now, plot the line using plot() method.To hide the instance, use plt.plot(x); (with semi-colon)Or, use _ = plt.plot(x).ExampleIn [1]: import numpy ... Read More
Rishikesh Kumar Rishi
976 Views
To save figures to pdf as raster images in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure.Add an axes to the figure as part of a subplot arrangement.Create random data ... Read More
Rishikesh Kumar Rishi
2K+ Views
To get the color of the last figure, we can use get_color() method for every plot.Set the figure size and adjust the padding between and around the subplots.Create x and y data point using numpy.Plot (x, x), (x, x2) and (x, x3) using plot() method.Place a legend for every plot ... Read More
Rishikesh Kumar Rishi
2K+ Views
To set the networkx edge labels offset, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Initialize a graph with edges, name, or graph attributes.Add multiple nodes.Position the nodes using Fruchterman-Reingold force-directed algorithm.Draw the graph G with Matplotlib.Draw edge labels.To display ... Read More
Rishikesh Kumar Rishi
2K+ Views
To plot contourf and log scale in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Initialize a variable, N, for number of sample data.Create x, y, X, Y, Z1, Z2 and z data points using numpy.Create a figure and ... Read More
Rishikesh Kumar Rishi
845 Views
To set horizontal and vertical, major and minor grid lines of a plot, we can use grid() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a figure and a set of subplots.Make horizontal grid lines for major ticks.Locate minor locator on the axes.Use grid() method ... Read More
Rishikesh Kumar Rishi
623 Views
To plot contour with hatching, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x, y and z data points using numpy.Flat the x and y data points.Create a figure and a set of subplots.Plot a contour with different hatches.Create ... Read More
Rishikesh Kumar Rishi
487 Views
To move a tick label without moving corresponding tick in Matplotlib, we can use axvline() method and can annotate it accordingly.StepsSet the figure size and adjust the padding between and around the subplots.Initialize a variable, delta.Create x and y data points using numpy.Plot delta using axvline() methodAnnotate that line using ... Read More