
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
13K+ Views
To plot points on the surface of a sphere in Python, we can use plot_surface() method.StepsCreate a new figure or activate an existing figure using figure() method.Add a set of subplots using add_subplot() method with 3d projection.Initialize a variable, r.Get the theta value for spherical points and x, y, and ... Read More

Rishikesh Kumar Rishi
19K+ Views
To create a 3D plot from a 3D numpy array, we can create a 3D array using numpy and extract the x, y, and z points.Create a new 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() ... Read More

Rishikesh Kumar Rishi
782 Views
To animate a contour plot in matplotlib in Python, we can take the following steps−Create a random data of shape 10☓10 dimension.Create a figure and a set of subplots using subplots() method.Makes an animation by repeatedly calling a function *func* using FuncAnimation() class.To update the contour value in a function, ... Read More

Rishikesh Kumar Rishi
2K+ Views
To position and align a matplotlib figure legend, we can take the following steps−Plot line1 and line2 using plot() method.Place a legend on the figure. Use bbox_to_anchor to set the position and make horizontal alignment of the legend elements.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt ... Read More

Rishikesh Kumar Rishi
3K+ Views
To convert numbers to a color scale in matplotlib, we can take the following steps.StepsCreate x, y and c data points using numpy.Convert the data points to Pandas dataframe.Create a new figure or activate an existing figure using subplots() method.Get the hot colormap.To linearly normalize the data, we can use ... Read More

Rishikesh Kumar Rishi
13K+ Views
To export an SVG file from a matplotlib figure, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a figure and a set of subplots.Create random x and y data points using numpy.Plot x and y data points using plot() method.Save ... Read More

Rishikesh Kumar Rishi
738 Views
To plot a time series in Python using matplotlib, we can take the following steps −Create x and y points using numpy.Plot the created x and y points using plot() method.To display the figure, use show() method.Exampleimport matplotlib.pyplot as plt import datetime import numpy as np plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] ... Read More

Rishikesh Kumar Rishi
297 Views
To give sns.clustermap a dataset, we can take the following steps −Set multiple theme parameters in one step.Load an example dataset from the online repository (requires Internet).Return item and drop from the frame. Raise KeyError if not found, using pop() method.Plot a matrix dataset as a hierarchically-clustered heatmap using clustermap() method.To display the figure, use show() ... Read More

Rishikesh Kumar Rishi
2K+ Views
To plot 3D graphs using Python, we can take the following steps −Create a new figure or activate an existing figure using figure() method.Get the 3D axes object.Make x, y, and z lists for data points.Add 3D scatter points using scatter3D() method, with x, y, and z data points with markersize=150 and ... Read More

Rishikesh Kumar Rishi
435 Views
To sharex when using subplot2grid, we can take the following steps −Create random data, t, x, y1 and y2 using numpy.Create a new figure or activate an existing figure using figure() method.Create a subplot at a specific location inside a regular grid with colspan=3 and rowspan=2.Create a subplot at a specific location ... Read More