
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
6K+ Views
To add a text into a rectangle in matplotlib, we can add a label in annotate method at the center point of the rectangle.StepsCreate a figure or activate an existing figure using figure() method.Add a subplot arrangement in the current axis.To add a rectangle in the plot, use Rectangle() class to get ... Read More

Rishikesh Kumar Rishi
5K+ Views
To get the center of a set of points, we can add all the elements of the list and divide that sum with the length of the list so that result could be the center of the corresponding axes.StepsMake two lists of data points.Plot x and y data points using plot() method.Get ... Read More

Rishikesh Kumar Rishi
2K+ Views
To set color to a rectangle in matplotlib, we can take the following steps −Create a figure or activate an existing figure using figure() method.Add an '~.axes.Axes' to the figure as part of a subplot arrangement using add_subplot() method.A rectangle is defined via an anchor point with width and heights.Add a rectangle ... Read More

Rishikesh Kumar Rishi
4K+ Views
To scale axes in mplot3d, we can take the following steps −Create a figure or activate an existing figure using figure() method.Instantaite 3D axes instance using Axes3D() class.To scale X-axis, use set_xlim3d() method.To scale Y-axis, use set_ylim3d() method.To scale Z-axis, use set_zlim3d() method.To display the plot, use show() method.Examplefrom mpl_toolkits.mplot3d import Axes3D from ... Read More

Rishikesh Kumar Rishi
4K+ Views
To increase the font size of the legend in a Seaborn plot, we can use the fontsize variable and can use it in legend() method argument.StepsCreate a data frame using Pandas. The keys are number, count, and select.Plot a bar in Seaborn using barplot() method.Initialize a variable fontsize to increase the ... Read More

Rishikesh Kumar Rishi
7K+ Views
To adjust the size of a matplotlib legend box, we can use borderpad arguments in the legend method.StepsCreate line1 and line2 using two lists with different line widths.To place a legend on the figure and to adjust the size of legend box, use borderpad=2 in legend() method.To display the figure, use show() method.Examplefrom matplotlib import ... Read More

Rishikesh Kumar Rishi
1K+ Views
To decrease the density of tick labels in subplots in matplotlib, we can assign the minimum value to density.StepsInitialize a variable, density.Create x and y data points using numpy.Plot x and y data points using plot() method.Get or set the current tick locations and labels of the X-axis using xticks() method.To display the figure, ... Read More

Rishikesh Kumar Rishi
8K+ Views
To switch axes in matplotlib, we can create a figure and add two subplots using subplots() method. Plot curves, extract x and y data, and set these data in a second plotted curve.StepsCreate x and y data points using numpy.Create a figure and add a set of two subplots.Set the ... Read More

Rishikesh Kumar Rishi
2K+ Views
To place text 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 method to the current axis.Create a Circle instance using Circle() class.Add a circle path on the plot.To place the text in the circle, we can use text() method.Scale ... Read More

Rishikesh Kumar Rishi
408 Views
To reshape a networkx graph in Python, we can take the following steps −Create a data frame using Panda's data frame.Return a graph from Pandas DataFrame containing an edge list using from_pandas_edgelist() method.Draw the graph G with matplotlib. We can reshape the network by increasing and decreasing the list of keys "from" ... Read More