- Trending Categories
- 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
To close a Python figure by a keyboard input, we can use plt.pause() method, an input, and close() method.StepsSet the figure size and adjust the padding between and around the subplots.Create random t and y data points using numpy.Create a new figure or activate an existing figure using figure() method.Plot ... Read More
Rishikesh Kumar Rishi
919 Views
To display an np.array with imshow(), we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Make a 2D data raster using an np.array.Display the data as an image, i.e., on a 2D regular raster.To display the figure, use show() method.Exampleimport numpy as ... Read More
Rishikesh Kumar Rishi
21K+ Views
To increase the space for X-axis labels in Matplotlib, we can use the spacing variable in subplots_adjust() method's argument.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using figure() method.Create x and y data points using numpy.Plot x ... Read More
Rishikesh Kumar Rishi
8K+ Views
To set Dataframe column value as X-axis labels in Python Pandas, we can use xticks in the argument of plot() method.StepsSet the figure size and adjust the padding between and around the subplots.Make a dataframe using Pandas with column1 key.Plot the Pandas dataframe using plot() method with column1 as the ... Read More
Rishikesh Kumar Rishi
687 Views
To plot a color wheel based on a colormap using Python/Matplotlib, we can use the colorbar class and can use copper colormap.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using figure() method.Add an axes to the figure ... Read More
Rishikesh Kumar Rishi
6K+ Views
To connect two points on a 3D scatter plot, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using figure() method.Add an axes to the current figure as a subplot arrangement.Create lists for ... Read More
Rishikesh Kumar Rishi
1K+ Views
We can plot statsmodels linear regression (OLS) with a non-linear curve but with linear data.StepsSet the figure size and adjust the padding between and around the subplots.To create a new one, we can use seed() method.Initialize the number of sample and sigma variables.Create linear data points x, X, beta, t_true, ... Read More
Rishikesh Kumar Rishi
543 Views
To control the alpha value on a 3D scatter plot using Python and Matplotlib, we can set the facecolor and edgecolors value.Set the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using figure() method.Add an '~.axes.Axes' to the figure ... Read More
Rishikesh Kumar Rishi
21K+ Views
To show all X coordinates (or Y coordinates), we can use xticks() method (or yticks()).StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Set x=0 and y=0 margins on the axes.Plot x and y data points using plot() method.Use xticks() ... Read More
Rishikesh Kumar Rishi
2K+ Views
To customize the axis label in a Seaborn jointplot, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Use jointplot() method to plot a joint plot in Seaborn.To set the customized axis label, we can ... Read More