- 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
587 Views
We can create a scatter plot using the scatter() method and we can set the color for every data point.StepsCreate random values (for x and y) in a given shape, using np.random.rand() method.Create a scatter plot of *y* vs. *x* with varying marker size and/or color, using the scatter method ... Read More
Rishikesh Kumar Rishi
2K+ Views
Using pylab.gcf(), we can create a fig variable and can set the fig.canvas.set_window_title('Setting up window title.') window title.StepsUsing gcf() method, get the current figure. If no current figure exists, a new one is created using `~.pyplot.figure()`.Set the title text of the window containing the figure, using set_window_title() method.. Note that ... Read More
Rishikesh Kumar Rishi
14K+ Views
Using plt.xticks, we can change the X-axis scale.StepsUsing plt.plot() method, we can create a line with two lists that are passed in its argument.Add text to the axes. Add the text *s* to the axes at location *x*, *y* in data coordinates, using plt.text() method, where the font size can ... Read More
Rishikesh Kumar Rishi
2K+ Views
Using plt.text() method, we can increase the font size.StepsUsing plt.plot() method, we can create a line with two lists that are passed in its argument.Add text to the axes. Add the text *s* to the axes at location *x*, *y* in data coordinates, using plt.text() method. Font size can be ... Read More
Rishikesh Kumar Rishi
300 Views
We can use a user-defined method, autolabel, to annotate the axis value. Before that, we can initialize the fig and ax using plt.subplots() method.StepsCreate lists, labels, men_means, and women_means with different data elements.Return evenly spaced values within a given interval, using numpy.arrange() method.Set the width variable i.e., width=0.35.Create fig and ... Read More
Rishikesh Kumar Rishi
301 Views
In this program, we can create a data frame and can plot a bar using df.plot.bar(x='lab', y='value', color='#5fba34') plot.StepsUsing Panda’s dataframe, we can create a data frame with the given dictionary, where the keys are lab and value, values of these keys are lists, respectively.Using Pandas plot.bar() method, we can ... Read More
Rishikesh Kumar Rishi
3K+ Views
Using plt.grid(axis="x") method, we can plot vertical gridlines.StepsMake a list of numbers.Set the X-axis label using plt.xlabel() method.Set the Y-axis label using plt.ylabel() method.Toggle the gridlines, and optionally set the properties of the lines, using plt.grid() method.To show the figure, use the plt.show() method, where the argument axis can be ... Read More
Rishikesh Kumar Rishi
13K+ Views
We can use the resolution value, i.e., dots per inch, and the image format to plot a high-resolution graph in Matplotlib.StepsCreate a dictionary with Column 1 and Column 2 as the keys and Values are like i and i*i, where i is from 0 to 10, respectively.Create a data frame ... Read More
Rishikesh Kumar Rishi
2K+ Views
To get interactive plots, we need to activate the figure. Using plt.ioff() and plt.ion(), we can perform interactive actions with plot.StepsCreate fig and ax variables using subplots method, where default nrows and ncols are 1.Draw a line, using plot() method.Set the color of the line, i.e., orange.Stopped the interaction, using ... Read More
Rishikesh Kumar Rishi
2K+ Views
First, we can initialize the dictionary with col1 and col2, convert it into a data frame. After that, we can plot this data with ‘o’ and ‘rx’ style.StepsCreate a dictionary with Column 1 and Column 2 as the keys and Values are like i and i*i, where i is from ... Read More