
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 create a legend for a contour plot in matplotlib, we can take the following steps−Create x, y and z data points to plot the contour function.To create a 3D filled contour plot, we can use contourf() method with x, y, z and different levels.Make a list of rectangle with ... Read More

Rishikesh Kumar Rishi
6K+ Views
To change the text color of font in the legend in matplotlib, we can take the following steps−Create x and y data points using numpy.Plot x and y using plot() method, where color of line is red and label is "y=exp(x)".To place the legend, use legend() method with location of ... Read More

Rishikesh Kumar Rishi
4K+ Views
To reduce the chances of overlapping between x and y tick labels in matplotlib, we can take the following steps −Create x and y data points using numpy.Add a subplot to the current figure at index 1 (nrows=1 and ncols=2).Set x and y margins to 0.Plot x and y data points and add a title to this subplot, ... Read More

Rishikesh Kumar Rishi
755 Views
To plot scatter points with increasing size of marker, we can take the following steps−StepsCreate x and y data pointsTo get increasing size of marker, make a list of numbers.Use scatter method to plot scatter points.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.00, ... Read More

Rishikesh Kumar Rishi
240 Views
To style a part of label in legend, we can take the following steps −Create data point for x using numpy.Plot a sine curve using np.sin(x) with a text label.Plot a cosine curve using np.cos(x) with a text label.To place the legend on the plot, use legend() method.To display the figure, ... Read More

Rishikesh Kumar Rishi
6K+ Views
To plot only a table, we can take the following steps−Create fig and axs, using subplots. Create a figure and a set of subplots.Create random data for 10 rows and 3 columns.Create a tuple for columns name.axis('tight') − Set the limits, just large enough to show all the data, then ... Read More

Rishikesh Kumar Rishi
1K+ Views
To add different graphs (as an inset) in another Python graph, we can take the following steps −Create x and y data points using numpy.Using subplots() method, create a figure and a set of subplots, i.e., fig and ax.To create a new axis, add axis to the existing figure (Step 2).Plot x and y on the ... Read More

Rishikesh Kumar Rishi
519 Views
To change order of plots in Pandas hist commad, we can take the following steps −Make a data frame using Pandas.Plot a histogram with the data frame.Plot the data frame in different order.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt import pandas as pd plt.rcParams["figure.figsize"] = [7.50, 3.50] ... Read More

Rishikesh Kumar Rishi
3K+ Views
To add vertical lines to a distribution plot, we can take the following steps−Create a list of numbers.Create an axis using sns.displot().Get x and y data of the axis ax.Plot a vertical line on the plot.Remove the line at the 0th index.To display the figure, use show() method.Exampleimport seaborn as ... Read More

Rishikesh Kumar Rishi
9K+ Views
To draw a log-normalized imshow() plot with a colorbar representing the raw data in matplotlib, we can take the following steps −Create a 2D array using numpy.Display the data as an image, i.e., on a 2D regular raster, using imshow() methodCreate a colorbar for a ScalarMappable instance, *mappable*, using imshow() ... Read More