- 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
4K+ Views
To plot data from .txt file using matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Initialize empty lists for bar_names and bar_heights.Open a sample .txt file in read "r" mode and append to bar's name and height list.Make a ... Read More
Rishikesh Kumar Rishi
6K+ Views
To save a histogram plot in Python, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create data points "k" for the histogram.Plot the histogram using hist() method.To save the histogram, use plt.savefig('image_name').To display the figure, use show() method.Exampleimport matplotlib.pyplot as ... Read More
Rishikesh Kumar Rishi
948 Views
We can use pandas.DataFrame.corr to compute pairwise correlation of columns, excluding NULL values. The correlation coefficient indicates the strength of the linear association between two variables. The coefficient ranges between -1 and 1.To get the correlation between two numeric columns in a Pandas dataframe, we can take the following steps ... Read More
Rishikesh Kumar Rishi
595 Views
The Finite Element Method (FEM) is used in a variety of tasks such as modeling of different material types, testing complex geometries, visualizing the local effects acting on a small area of a design. It basically breaks a large spatial domain into simple parts called "finite elements". The simple equations ... Read More
Rishikesh Kumar Rishi
1K+ Views
To add a legend with vertical line in matplotlib, 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.Plot the vertical line with red color.The line can have both a solid linestyle connecting all ... Read More
Rishikesh Kumar Rishi
3K+ Views
To exponentially scale the Y-axis with matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Inintialize a variable dt for steps.Create x and y data points using numpy.Plot the x and y data points using numpy.Set the exponential scale for ... Read More
Rishikesh Kumar Rishi
399 Views
To annotate Seaborn pairplots, we can use the fig.text() method.StepsImport Seaborn, Pandas, Numpy, and Pyplot packages.Set the figure size and adjust the padding between and around the subplots.Create a Pandas dataframe of two-dimensional, size-mutable, potentially heterogeneous tabular data.Plot pairwise relationships in a dataset, using sns.pairplot().Add an annotated text using fig.text() ... Read More
Rishikesh Kumar Rishi
456 Views
To draw the largest polygon from a set of points in matplotlib, we can take the following steps −Import "Polygon" from matplotlib.patches.Set the figure size and adjust the padding between and around the subplots.Create a list of data points for the largest polygon.Get the polygon instance.Create a figure and a ... Read More
Rishikesh Kumar Rishi
6K+ Views
To change the face color of a plot using matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Create a figure and a set of subplots.Plot the x and y data points using ... Read More
Rishikesh Kumar Rishi
541 Views
To plot a masked surface plot using Python, Numpy and Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure.Add an 'ax' to the figure as part of a subplot arrangement.Return the ... Read More