
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 annotate data points while plotting from pandas data frame, we can take the following steps −Create df using DataFrame with x, y and index keys.Create a figure and a set of subplots using subplots() method.Plot a series of data frame using plot() method, kind='scatter', ax=ax, c='red' and marker='x'.To annotate the ... Read More

Rishikesh Kumar Rishi
12K+ Views
To fill color below a curve, we can take the following steps −StepsInitialize variable n. Initialize x and y data points using numpy.Create a figure and a set of subplots, fig and ax.Plot the curve using plot() method.Use fill_between() method to fill the area between the two curves, with -1 value.To display ... Read More

Rishikesh Kumar Rishi
2K+ Views
To plot a histogram from pre-counted data in matplotlib, we can take the following steps −Create a list of numbers.Make a pre-counted list with the help of input data.Plot a histogram with data, color=red, and label=data, using hist() method.Plot another histogram with counted data, color=default, and label=counted_data, using hist() method.To place ... Read More

Rishikesh Kumar Rishi
2K+ Views
To show an axes subplot in Python, we can use show() method. When multiple figures are created, then those images are displayed using show() method.StepsCreate x and y data points using numpy.Plot x and y using plot() method.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt import ... Read More

Rishikesh Kumar Rishi
1K+ Views
To change the color of the ticks in the colorbar in matplotlib, we can take the following steps−Create a random 2D−Array using numpy, with 4☓4 dimension.Use imshow() method to display the data as an image.Create a colorbar using colorbar() method with scalar mappable instance of imshow().Use getp() method to return ... Read More

Rishikesh Kumar Rishi
3K+ Views
To draw a rectangle with only border in matplotlib, we can take the following steps−Create a figure and a set of subplots.Get the current axes, creating one if necessary.Add a patch, i.e., a rectangle to the current axes that is returned in step 2. Set the facecolor attribute to 'none'.To ... Read More

Rishikesh Kumar Rishi
8K+ Views
To insert a small image on the corner of a plot with matplotlib, we can take the following steps−Read an image from a file into an array using imread() method.Using subplots() method, create a figure and add a set of subplots.Plot a line on the current axis.Create newax (new axis) ... Read More

Rishikesh Kumar Rishi
5K+ Views
Let's take an example. We create a set of data points such that it would generate some warnings. We will create data points x from −1 to 1 and try to find log in that range, which means it will throw an error at value 0, while calculating logs.StepsCreate data ... Read More

Rishikesh Kumar Rishi
506 Views
To place edge color and hatch of 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 method to the current axis.Create a circle instance using Circle() class with an edgecolor, hatch and linewidth of the edge.Add a circle path ... Read More

Rishikesh Kumar Rishi
3K+ Views
To fill color above the curve, we can take the following steps −StepsInitialize the variable n. Initialize x and y data points using numpy.Create a figure and a set of subplots, fig and ax.Plot the curve using plot() method.Using fill_between() method, fill the area between two curves, with 1 value.To display the figure, use ... Read More