
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 1156 Articles

Rishikesh Kumar Rishi
3K+ 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
1K+ 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
3K+ 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
3K+ 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
979 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
778 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
563 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

Rishikesh Kumar Rishi
2K+ Views
To axes axis label object in Matplotlib, we can use ax.xaxis.get_label().get_text() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a figure and a set of subplots.Initialize a variable, N, for number samples.Create random data points using numpy.Plot x data points using plot() method.Set X-axis label ... Read More

Rishikesh Kumar Rishi
318 Views
To adjust one subplot's height in absolute way 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.For absolute height of subplot, use Axes() classAdd an axes to the figure.Plot the ... Read More