
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
407 Views
Using Pandas, we can create a data frame and create a figure and axis. After that, we can use the scatter method to draw points.StepsCreate lists of students, marks obtained by them, and color codings for each score.Make a data frame using Panda’s DataFrame, with step 1 data.Create fig and ... Read More

Rishikesh Kumar Rishi
7K+ Views
ROC − Receiver operating characteristics (ROC) curve.Using metrics.plot_roc_curve(clf, X_test, y_test) method, we can draw the ROC curve.StepsGenerate a random n-class classification problem. This initially creates clusters of points normally distributed (std=1) about vertices of an ``n_informative``-dimensional hypercube with sides of length ``2*class_sep`` and assigns an equal number of clusters to ... Read More

Rishikesh Kumar Rishi
386 Views
Using plt.subplots(1, 1) method, we can create fig and axis. We can use fig.colorbar to make the color bar at the midpoint of the figure.StepsUsing mgrid() method, `nd_grid` instance which returns an open multi-dimensional "meshgrid".Create Z1, Z2 and Z data.Create fig and ax variables using subplots method, where default nrows ... Read More

Rishikesh Kumar Rishi
719 Views
We can use matplotlib.rcParams['backend'] to override the backend value.StepsUsing get_backend() method, return the name of the current backend, i.e., default name.Now override the backend name.Using get_backend() method, return the name of the current backend, i.e., updated name.Exampleimport matplotlib print("Before, Backend used by matplotlib is: ", matplotlib.get_backend()) matplotlib.rcParams['backend'] = 'TkAgg' print("After, ... Read More

Rishikesh Kumar Rishi
765 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
3K+ 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
15K+ 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
446 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
490 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