
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
16K+ Views
To show matplotlib graphs as full screen, we can use full_screen_toggle() method.StepsCreate a figure or activate an existing figure using figure() method.Plot a line using two lists.Return the figure manager of the current figure.To toggle full screen image, use full_screen_toggle() method.To display the figure, use show() method.Examplefrom matplotlib import pyplot ... Read More

Rishikesh Kumar Rishi
7K+ Views
To make a 4D plot, we can create x, y, z and c standard data points. Create a new figure or activate an existing figure.StepsUse figure() method to create a figure or activate an existing figure.Add a figure as part of a subplot arrangement.Create x, y, z and c data points ... Read More

Rishikesh Kumar Rishi
892 Views
To plot a very simple bar chart from an input text file, we can take the following steps −Make an empty list for bar names and heights.Read a text file and iterate each line.Append names and heights into lists.Plot the bar using lists (Step 1).To display the figure, use show() method.Examplefrom matplotlib import pyplot ... Read More

Rishikesh Kumar Rishi
2K+ Views
To make two histograms having same bin width, we can compute the histogram of a set of data.StepsCreate random data, a, and normal distribution, b.Initialize a variable, bins, for the same bin width.Plot a and bins using hist() method.Plot b and bins using hist() method.To display the figure, use show() method.Exampleimport numpy as ... Read More

Rishikesh Kumar Rishi
3K+ Views
To increase/reduce the fontsize of x and y tick labels in matplotlib, we can initialize the fontsize variable to reduce or increase font size.StepsCreate a list of numbers (x) that can be used to tick the axes.Get the axis using subplot() that helps to add a subplot to the current figure.Set ... Read More

Rishikesh Kumar Rishi
755 Views
To plot a rectangle inside a circle in matplotlib, we can take the following steps −Create a new figure or activate an existing figure using figure method.Add a subplot to the current axis.Make a rectangle and a circle instance using Rectangle() and Circle() class.Add a patch on the axes.Scale x and y ... Read More

Rishikesh Kumar Rishi
514 Views
set_xlim − Set the X-axis view limits.set_xbound − Set the lower and upper numerical bounds of the X-axis.To set the xlim and xbound, we can take the following steps −Using subplots(2), we can create a figure and a set of subplots. Here, we are creating 2 subplots.Create x and y ... Read More

Rishikesh Kumar Rishi
3K+ Views
To animate pcolormesh in matplotlib, we can take the following steps −Create a figure and a set of subplots.Create x, y and t data points using numpy.Create X3, Y3 and T3, return coordinate matrices from coordinate vectors using meshgrid.Create a pseudocolor plot with a non-regular rectangular grid using pcolormesh() method.Make a colorbar with ... Read More

Rishikesh Kumar Rishi
4K+ Views
To add a colorbar for hist2d plot, we can pass a scalar mappable object to colorbar() method's argument.StepsCreate x and y data points using numpy.Create a figure and a set of subplots using subplots() method.Make a 2D histogram plot using hist2d() method.Create a colorbar for a hist2d scalar mappable instance.To display the ... Read More

Rishikesh Kumar Rishi
5K+ Views
To set axis ticks in multiples of pi in Python, we take following steps −Initialize a pi variable, create theta and y data points using numpy.Plot theta and y using plot() method.Get or set the current tick locations and labels of the X-axis using xticks() method.Convenience method to set or retrieve autoscaling ... Read More