
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
1K+ Views
We can use annotate() method to place annotation outside the drawing.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Create a figure and a set of subplots using subplots() method.Use scatter() method to plot x and y data points using ... Read More

Rishikesh Kumar Rishi
3K+ Views
To plot a histogram for discrete values with matplotlib, we can use hist() method.StepsSet the figure size and adjust the padding between and around the subplots.Make a list of discrete values.Use hist() method to plot data with bins=length of data and edgecolor=black.To display the figure, use show() method.Examplefrom matplotlib import ... Read More

Rishikesh Kumar Rishi
1K+ Views
To plot only the upper/lower triangle of a heatmap in matplotlib, we can use numpy to get the masked 2D array and convert them into an image to produce a heatmap.StepsSet the figure size and adjust the padding between and around the subplots.Create a random data of 5×5 dimension.Use numpy.tri() ... Read More

Rishikesh Kumar Rishi
590 Views
To control matplotlib marker orientation, we can use marker tuple that contains a number of sides, style and rotation or orientation of the marker.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Make an array of 10 different rotations.Zip x, ... Read More

Rishikesh Kumar Rishi
2K+ Views
We can use annotate() to place an emoji at the top of a bar.StepsSet the figure size and adjust the padding between and around the subplots.Make a list of frequencies and labels conatining emojis.Create a new figure or activate an existing figure using figure() method.Plot bars using bar() method.Use annotate() ... Read More

Rishikesh Kumar Rishi
2K+ Views
To give a border to a line in matplotlib plot function, we can call plot() function twice with varying line width.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot x and y data points where line width=10 and color=black.Again ... Read More

Rishikesh Kumar Rishi
3K+ Views
To change the linewidth of a hatch in matplotlib, we can set the linewidth of the hatch in the params.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y=sin(x) data points using numpy.Set the linewidth of the hatch in the plot.Plot x and y ... Read More

Rishikesh Kumar Rishi
836 Views
To plot scatter points on a 3D plot without axes in matplotlib, we can use scatter() method and make the axes OFF.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using figure() method.Add an axis as a subplot ... Read More

Rishikesh Kumar Rishi
976 Views
To add a custom border to certain cells in a Matplotlib/Seaborn plot.StepsSet the figure size and adjust the padding between and around the subplots.Create a dataframe with some columns.Plot a matrix dataset as a hierarchically-clustered heatmap.Get heatmap axis as a subplot arrangement.To add a custom border to certain cells in ... Read More

Rishikesh Kumar Rishi
1K+ Views
To just show the text label in plot legend we can use legend method with handlelength=0, handletextpad=0 and fancybox=0 in the arguments.StepsSet the figure size and adjust the padding between and around the subplots.Create random x and y data points using numpy.Create a figure and a set of subplots using ... Read More