Rishikesh Kumar Rishi has Published 1156 Articles

How to adjust the branch lengths of a dendrogram in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:32:56

1K+ Views

To adjust the branch length of a dendrogram in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Draw random samples (a and b) from a multivariate normal distribution.Join a sequence of arrays along an existing axis, using concatenate() method.Perform ... Read More

How to add bold annotated text in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:31:26

2K+ Views

To add bold annotated text in matplotlib, we can use LaTeX representation for labels.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.To set the label for each scattered point, make a list of labels.Plot xpoints, ypoints using scatter() method. ... Read More

How to plot half or quarter polar plots in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:29:13

1K+ Views

To plot half or quarter polar plots in 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 using figure() method.Add an axes to the figure as part of a subplot arrangement.For ... Read More

How to plot a point on 3D axes in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:27:54

6K+ Views

To plot a point on 3D axes in 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 using figure() method.Add an axes to the figure as part of a subplot arrangement, ... Read More

How to display a Dataframe next to a Plot in Jupyter Notebook?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:25:18

2K+ Views

To display a dataframe next to a plot, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make a Pandas dataframe with straight and square keys.Create a new figure or activate an existing figure using figure() method.Add a subplot to the ... Read More

Plotting histograms against classes in Pandas / Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:22:58

278 Views

To plot histograms against classes in Pandas/Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make a potentially hetrogeneous tabular data using Pandas dataframe.Make a histogram from the DataFrame values.To display the figure, use show() method.Examplefrom matplotlib import pyplot as ... Read More

How to plot a Bar Chart with multiple labels in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:21:31

3K+ Views

To plot a bar chart with multiple labels in Matplotlib, we can take the following steps −Make some data set for men_means, men_std, women_means, and women_std.Make index data points using numpy.Initialize the width of the bars.Use subplots() method to create a figure and a set of subplots.Create rects1 and rects2 ... Read More

Rotating axes label text in 3D Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:17:23

4K+ Views

To rotate axes label text in 3D matplotlib, we can use set_zlabel() method with rotation in the 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.Add a subplot to the current axis with projection="3d".Initialize ... Read More

Drawing multiple legends on the same axes in Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 10:13:58

10K+ Views

To draw multiple legends on the same axes in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplotsPlot lines using two lists with different labels, linewidth and linestyle.Place the first legend at the upper-right location.Add artist, i.e., first legend ... Read More

Best way to plot an angle between two lines in Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 10:12:07

2K+ Views

The best way to plot an angle between two lines in Matplotlib is to use the Arc class to make an angle arc to plot the angle in between.StepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure using ... Read More

Advertisements