- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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 1162 Articles
Rishikesh Kumar Rishi
986 Views
We can plot a diagram where a number of students will be plotted on the X-axis and the marks obtained by them will be plotted on the Y-axis. Also, we can set the color for different marks obtained by the students.StepsMake a list of the number of students.Make a list ... Read More
Rishikesh Kumar Rishi
2K+ Views
Let’s understand the difference between plot, axes, and figure with an example.Plot − Plot helps to plot just one diagram with (x, y) coordinates.Axes − Axes help to plot one or more diagrams in the same window and sets the location of the figure.Figure − This method provides a top-level ... Read More
Rishikesh Kumar Rishi
173 Views
Seaborn is used to visualizing the random distribution and we can use matplotlib interface to show this distribution over a diagram.We can take the following steps to show the diagram −Figure level interface for drawing distribution plots onto a Face Grid. This function provides access to several approaches for visualizing ... Read More
Rishikesh Kumar Rishi
4K+ Views
To set the matplotlib figure default size in iPython, use the following steps −To check the default figure size, use plt.rcParams["figure.figsize"] over the ipython shell.Now to set the figure size, override the plt.rcParams["figure.figsize"] variable with a tuple i.e., (20, 10).After overriding the plt.rcParams["figure.figsize"] variable, you can use it to get ... Read More
Rishikesh Kumar Rishi
2K+ Views
To fill color between two vertical lines, use the following steps −Using plt.subplots() method, create a figure and a set of subplots. This utility wrapper makes it convenient to create common layouts of subplots, including the enclosing figure object, in a single call.To draw two vertical lines, initialize x = ... Read More
Rishikesh Kumar Rishi
1K+ Views
To remove or adapt the border of the frame of legend we can follow the following steps −Set the X-axis label using the plt.xlabel() method.Set the Y-axis label using the plt.ylabel() method.Plot the lines using the plt.plot() method with [9, 5], [2, 5] and [4, 7, 8] array.Initializing two variables; ... Read More
Rishikesh Kumar Rishi
13K+ Views
To plot a histogram using Matplotlib, we can follow the steps given below −Make a list of numbers and assign it to a variable x.Use the plt.hist() method to plot a histogram.Compute and draw the histogram of *x*.We can pass n-Dimensional arrays in the hist argument also.To show the plotted ... Read More
Rishikesh Kumar Rishi
4K+ Views
To display multiple images in one figure, we can follow the steps given below −Initialize the number of rows and cols. nrows*ncols subplot will be created in the current figure. nrows = 2 and ncols = 2, i.e., 2*2 = 4 subplots can be created.Now add the figures at different ... Read More
Rishikesh Kumar Rishi
814 Views
To pick a new color for each plotted line within a figure, use the following steps −Setup X-axis and Y-axis labels for the diagram.Set the current .rc parameters. For axes facecolor, the group is axes.Use a cycler to set the color for the group of lines. The color list consists ... Read More
Rishikesh Kumar Rishi
7K+ Views
To hide the axis value but to keep the axis tick labels, we can perform the following steps −Plot a line using the plot( ) method.Set X and Y labels using x label and y label methods.Using plt.gca(), get the current axis, creating one if necessary.Use xaxis.set_ticklabels() with an empty ... Read More