- 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
11K+ Views
To export an SVG file from a matplotlib figure, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a figure and a set of subplots.Create random x and y data points using numpy.Plot x and y data points using plot() method.Save ... Read More
Rishikesh Kumar Rishi
560 Views
To plot a time series in Python using matplotlib, we can take the following steps −Create x and y points using numpy.Plot the created x and y points using plot() method.To display the figure, use show() method.Exampleimport matplotlib.pyplot as plt import datetime import numpy as np plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] ... Read More
Rishikesh Kumar Rishi
206 Views
To give sns.clustermap a dataset, we can take the following steps −Set multiple theme parameters in one step.Load an example dataset from the online repository (requires Internet).Return item and drop from the frame. Raise KeyError if not found, using pop() method.Plot a matrix dataset as a hierarchically-clustered heatmap using clustermap() method.To display the figure, use show() ... Read More
Rishikesh Kumar Rishi
2K+ Views
To plot 3D graphs using Python, we can take the following steps −Create a new figure or activate an existing figure using figure() method.Get the 3D axes object.Make x, y, and z lists for data points.Add 3D scatter points using scatter3D() method, with x, y, and z data points with markersize=150 and ... Read More
Rishikesh Kumar Rishi
310 Views
To sharex when using subplot2grid, we can take the following steps −Create random data, t, x, y1 and y2 using numpy.Create a new figure or activate an existing figure using figure() method.Create a subplot at a specific location inside a regular grid with colspan=3 and rowspan=2.Create a subplot at a specific location ... Read More
Rishikesh Kumar Rishi
5K+ Views
To add a text into a rectangle in matplotlib, we can add a label in annotate method at the center point of the rectangle.StepsCreate a figure or activate an existing figure using figure() method.Add a subplot arrangement in the current axis.To add a rectangle in the plot, use Rectangle() class to get ... Read More
Rishikesh Kumar Rishi
5K+ Views
To get the center of a set of points, we can add all the elements of the list and divide that sum with the length of the list so that result could be the center of the corresponding axes.StepsMake two lists of data points.Plot x and y data points using plot() method.Get ... Read More
Rishikesh Kumar Rishi
1K+ Views
To set color to a rectangle in matplotlib, we can take the following steps −Create a figure or activate an existing figure using figure() method.Add an '~.axes.Axes' to the figure as part of a subplot arrangement using add_subplot() method.A rectangle is defined via an anchor point with width and heights.Add a rectangle ... Read More
Rishikesh Kumar Rishi
4K+ Views
To scale axes in mplot3d, we can take the following steps −Create a figure or activate an existing figure using figure() method.Instantaite 3D axes instance using Axes3D() class.To scale X-axis, use set_xlim3d() method.To scale Y-axis, use set_ylim3d() method.To scale Z-axis, use set_zlim3d() method.To display the plot, use show() method.Examplefrom mpl_toolkits.mplot3d import Axes3D from ... Read More
Rishikesh Kumar Rishi
3K+ Views
To increase the font size of the legend in a Seaborn plot, we can use the fontsize variable and can use it in legend() method argument.StepsCreate a data frame using Pandas. The keys are number, count, and select.Plot a bar in Seaborn using barplot() method.Initialize a variable fontsize to increase the ... Read More