
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
12K+ Views
To put some superscript in Python, we can take the following steps −Create points for a and f using numpy.Plot f = ma curve using the plot() method, with label f=ma.Add title for the plot with superscript, i.e., kgms-2.Add xlabel for the plot with superscript, i.e., ms-2.Add ylabel for the plot with superscript, i.e., ... Read More

Rishikesh Kumar Rishi
8K+ Views
To rotate tick labels for Seaborn barplot, we can take the following steps −Make a dataframe using Pandas.Plot the bar using Seaborn's barplot() method.Rotate the xticks label by 45 angle.To display the figure, use the show() method.Exampleimport pandas import matplotlib.pylab as plt import seaborn as sns import numpy as np plt.rcParams["figure.figsize"] = [7.50, 3.50] ... Read More

Rishikesh Kumar Rishi
5K+ Views
To plot interactive matplotlib’s imshow window, we can take the following steps −Using the subplots() method, create a figure and a set of subplots.Create an array to plot an image, using numpy.Display the image using the imshow() method.To make a slider axis, create an axes and a slider, with facecolor=yellow.To update ... Read More

Rishikesh Kumar Rishi
260 Views
To differentiate antialiasing through curves, we can take the following Steps −Add a subplot to the current figure, using the subplot() method, where nrows=1, ncols=2 and index=1.Plot the curve using the plot() method, where antialiased flag is false and color is red.Place the legend at the upper-left corner using the legend() method.Add ... Read More

Rishikesh Kumar Rishi
4K+ Views
To get the legend as a separate picture, we can take the following steps −Create x and y points using numpy.Using the figure() method, create a new figure, or activate an existing figure for Line plot and Legend plot figures.Add an '~.axes.Axes' to the figure as part of a subplot arrangement, ... Read More

Rishikesh Kumar Rishi
4K+ Views
To plot logarithmic Y-axis bins in Python, we can take the following steps −Create x and y points using numpy.Set the Y-axis scale using the yscale() method.Plot the x and y points, using the plot() method with linestyle="dashdot" and label="y=log(x)".To activate the label of the line, use the legend() method.To display the figure, ... Read More

Rishikesh Kumar Rishi
349 Views
To plot matplotlib contour, we can take the following steps −Create data points for x, y and h using numpy.Using the countourf() method, create a colored 3D (alike) plot.Using the set_over() method, set the color for high out-of-range values when "norm.clip = False".Using the set_under() method, set the color for low ... Read More

Rishikesh Kumar Rishi
1K+ Views
Let's take an example to see how to display a 3D plot of a 3D array isosurface in matplotlib −Exampleimport numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True x = np.arange(-5, 5, 0.25) y = np.arange(-5, 5, 0.25) x, y ... Read More

Rishikesh Kumar Rishi
1K+ Views
To save the plot to a numpy array in RGB format, we can take the following steps −Create r, g and b random array using numpy.Zip r, g and b (grom step 1) to make an rgb tuple list.Convert rgb into a numpy array to plot it.Plot the numpy array that is in rgb format.Save the ... Read More

Rishikesh Kumar Rishi
10K+ Views
To set the range of Y-axis for a Seaborn boxplot, we can take the following steps −Using set_style() method, set the aesthetic style of the plots.Load the dataset using load_dataset("tips"); need Internet.Using boxplot(), draw a box plot to show distributions with respect to categories.To set the range of Y-axis, use ... Read More