Rishikesh Kumar Rishi has Published 1162 Articles

How to draw a filled arc in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 09:12:31

760 Views

To draw a filled arc 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.Initialize two variables, r, yoff.Create x and y data points using Numpy.Fill the area between x and y ... Read More

How to create a surface plot from a greyscale image with Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 08:57:42

980 Views

To create a surface plot from a grayscale image with matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create random data points using Numpy.Get the xx and yy data points from a 2d image data raster.Create a new figure ... Read More

How to remove the first and last ticks label of each Y-axis subplot in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 08:56:18

2K+ Views

To remove the first and last ticks label of each Y-axis subplot, 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.Iterate the axes and set the first and last ticklabel's visible=False.To display the ... Read More

How to extract only the month and day from a datetime object in Python?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 08:51:27

1K+ Views

To extract only the month and day from a datetime object in Python, we can use the DateFormatter() class.stepsSet the figure size and adjust the padding between and around the subplots.Make a dataframe, df, of two-dimensional, size-mutable, potentially heterogeneous tabular data.Create a figure and a set of subplots.Plot the dataframe using ... Read More

How to remove whitespaces at the bottom of a Matplotlib graph?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 08:43:20

3K+ Views

To remove whitespaces at the bottom of a Matplotlib graph, we can use tight layout or autoscale_on=False.stepsSet 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.Plot a list ... Read More

How to understand Seaborn's heatmap annotation format?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 08:34:41

2K+ Views

To understand Seaborn's heatmap annotation format, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a Pandas dataframe with five columns.Plot the rectangular data as a color-encoded matrix, fmt=".2%" represents the annotation format.To display the figure, use show() method.ExampleExampleimport seaborn ... Read More

How to create a 100% stacked Area Chart with Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 23-Sep-2021 08:03:50

940 Views

To create a 100% stacked Area Chart with Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a list of years.Make a dictionary, with list of population in respective years.Create a figure and a set of subplots.Draw a stacked ... Read More

Creating 3D animation using matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 22-Sep-2021 08:59:38

5K+ Views

To create a 3D animation using matplotlib, we can take the following steps −Import the required packages. For 3D animation, you need to import Axes3D from mpl_toolkits.mplot3d and matplotlib.animation.Set the figure size and adjust the padding between and around the subplots.Create t, x, y and data points using numpy.Create a ... Read More

How to create broken horizontal bar graphs in matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 22-Sep-2021 08:52:51

209 Views

To create broken horizontal bar graphs 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 a horizontal sequence of rectangles.Scale X and Y axes limit.Configure the grid lines.Annotate the broken bars.To ... Read More

How to modify a 2d Scatterplot to display color based on a third array in a CSV file?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 22-Sep-2021 08:47:24

238 Views

To modify a 2d scatterplot to display color based on a third array in a CSV file, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Read the CSV file with three headers.Create a new figure or activate an existing figure.Add ... Read More

Advertisements