- 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
1K+ Views
We can create a dict for color and a value. If the same value comes up, we can use a scatter method and if the closer values have the same set of colors, that could make the plot color denser.StepsCreate a new figure, or activate an existing figure.Add an ~.axes.Axes ... Read More
Rishikesh Kumar Rishi
263 Views
Using Pandas, we can create a dataframe with time and speed, and thereafter, we can use the data frame to get the desired plot.StepsConstruct a new Generator with the default BitGenerator (PCG64).Using Pandas, get a fixed frequency DatetimeIndex. From '2020-01-01' to '2021-01-01'.Draw samples from a log-normal distribution.Make a data frame ... Read More
Rishikesh Kumar Rishi
368 Views
In plt.hist() method, stacked=True could help to get the heights of the bars sum to 1.StepsCreate a list of numbers.Using plt.hist(), we can draw the histogram.stacked : bool, default: FalseIf "True", multiple data are stacked on top of each other If ``False`` multiple data are arranged side by side if ... Read More
Rishikesh Kumar Rishi
837 Views
First, we can create an array matrix with some np.nan value, and using imshow method, we can create a diagram for that matrix.StepsCreate a new figure, or activate an existing figure.Add an `~.axes.Axes` to the figure as part of a subplot arrangement, nrows = 1, ncols = 1, index = ... Read More
Rishikesh Kumar Rishi
408 Views
To get the axes instance, we will use the subplots() method.StepsMake a list of years.Make a list of populations in that year.Get the number of labels using np.arrange(len(years)) method.Set the width of the bars.Create fig and ax variables using subplots() method, where default nrows and ncols are 1.Set the Y-axis ... Read More
Rishikesh Kumar Rishi
4K+ Views
Whenever Y value list will be made, then we will convert those datasets into a new list, with ceil and floor value of the given list accordingly. Then, we can plot the graph for the new list data.StepsTake an input list.Find the minimum and maximum values in the input list ... Read More
Rishikesh Kumar Rishi
180 Views
pylab is a module that imports matplotlib.pyplot (for plotting) and numpy (for mathematics and working with arrays) in a single namespace.Although many examples use pylab, it is no longer recommended. For non-interactive plotting, it is suggested to use pyplot to create the figures and then the OO interface for plotting.Exampleimport ... Read More
Rishikesh Kumar Rishi
3K+ Views
Using plt.figure() method, we can create a figure and thereafter, we can create an axis. Using set_xticks and set_yticks, we can change the ticks format and ax.grid could help to specify the grid interval.StepsCreate a new figure, or activate an existing figure, using fig = plt.figure() method.Add an `~.axes.Axes` to ... Read More
Rishikesh Kumar Rishi
8K+ Views
To get a linear regression plot, we can use sklearn’s Linear Regression class, and further, we can draw the scatter points.StepsGet x data using np.random.random((20, 1)). Return random floats in the half-open interval[20, 1).Get the y data using np.random.normal() method. Draw random samples from a normal (Gaussian) distribution.Get ordinary least ... Read More
Rishikesh Kumar Rishi
5K+ Views
First, we will create a polygon using the mplPath.Path method and to check whether a given point is in the polygon or not, we will use the method, poly_path.contains_point.StepsCreate a list of points to make the polygon.Create a new path with the given vertices and codes, using mplPath.Path().Check if point ... Read More
To Continue Learning Please Login
Login with Google