
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
966 Views
To display Y-axis range using absolute values rather than offset values, we can take the following steps −Create x_data and y_data data points in the range of 100 to 1000.Create a figure and a set of subplots using subplots() method.Plot x_data and y_data using plot() method.If a parameter is not set, the corresponding property ... Read More

Rishikesh Kumar Rishi
2K+ Views
To draw lines between two plots in matplotlib, we can take the following steps −Create a new figure or activate an existing figure.Add two axes (ax1 and ax2) to the figure as part of a subplot arrangement.Create random data x and y using numpy.Plot x and y data points on ... Read More

Rishikesh Kumar Rishi
4K+ Views
To display or hide box border in matplotlib, we can use spines (value could be right, left, top or bottom) and set_visible() method to set the visibility to True or False.StepsCreate x and y data points using numpy.Create a figure and add a set of subplots using subplots() method.Plot x ... Read More

Rishikesh Kumar Rishi
3K+ Views
To adjust (offset) the colorbar title in matplotlib, we can take the following steps −Create a random data of 4×4 dimension.Use imshow() method to display the data as an imgage.Create a colorbar for a scalar mappable instance using colorbar() method, with im mappable instance.Now, adjust (offset) the colorbar title in matplotlib, with labelpad=-1. ... Read More

Rishikesh Kumar Rishi
8K+ Views
To increase plt.title font size, we can initialize a variable fontsize and can use it in the title() method's argument.StepsCreate x and y data points using numpy.Use subtitle() method to place the title at the center.Plot the data points, x and y.Set the title with a specified fontsize.To display the figure, use ... Read More

Rishikesh Kumar Rishi
324 Views
To configure the behaviour of the backend, we can use matplotlib.rcParams['backend'] with a new backend name.StepsUse get_backend() method to get the backend name.Override the existing backend name using matplotlib.rcParams.Use get_backend() method to get the configured backend name.Exampleimport matplotlib backend = matplotlib.get_backend() print("The current backend name is: ", backend) matplotlib.rcParams['backend'] = ... Read More

Rishikesh Kumar Rishi
1K+ Views
We can change the strength of antialiasing by using True or False flag in the argument of plot() method.StepsCreate x data points and colors list with different colors.Defining a method that accepts antialiased flag and axis.We can iterate in the range of 5, to print 5 different colors of curves from ... Read More

Rishikesh Kumar Rishi
593 Views
Meshgrid − Coordinate matrices from coordinate vectors.Let's take an example to see how we can apply a function to a Python meshgrid. We can consider two lists, x and y, using numpy vectorized decorator.Exampleimport numpy as np @np.vectorize def foo(a, b): return a + b x = [0.0, 0.5, ... Read More

Rishikesh Kumar Rishi
328 Views
Using plt.figure(), we can create multiple figures and to close them all explicitly, call plt.close(). If you are creating many figures, make sure you explicitly call pyplot.close on the figures you are not using, because this will enable pyplot to properly clean up the memory.Using subplots(), we can create a figure ... Read More

Rishikesh Kumar Rishi
6K+ Views
To adjust transparency, i.e., aplha in Seaborn pairplot, we can change the value of alpha.StepsCreate a dataframe using Pandas with two keys, col1 and col2.Initialize the variable, alpha, for transparency.Use pairplot() method to plot pairwise relationships in a dataset. Use df (from step 1), kind="scatter", and set the plot size, ... Read More