Rishikesh Kumar Rishi has Published 1162 Articles

How to set the value of the axis multiplier in matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 01-Feb-2022 11:07:43

1K+ Views

To set the value of the axis multiplier in matplotlib, we can take the following steps −StepsSet the figure size and adjust the padding between and around the subplots.Create x data points using numpy.Plot x and x2 using plot() method.Get the current axis of the figure.Initialize a variable multiplier, i.e., ... Read More

In Matplotlib, show the percentage or proportional data where each slice of pie represents a category

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 26-Oct-2021 13:02:12

2K+ Views

In this article, we can create a pie chart to show our daily activities, i.e., sleeping, eating, working, and playing. Using plt.pie() method, we can create a pie chart with the given different data sets for different activities.StepsCreate a list of days, i.e., [1, 2, 3, 4, 5]. Similarly, make ... Read More

What is the equivalent of Matlab's surf(x,y,z,c) in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 21-Oct-2021 08:48:15

572 Views

Let's take an example to see how to get the same effect as MatLab's surf(x, y, z, c) in Matplotlib. 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 ... Read More

Animation with contours in matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 09:10:27

3K+ Views

To animate with contours in matplotlib, we can take the following stepsStepsSet the figure size and adjust the padding between and around the subplots.Create data for the contour plot.Create a figure and a set of subplots.Generate an animation by repeatedly calling a function *animate* where the animate() method changes the ... Read More

How to curve text in a polar plot in matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 08:41:45

527 Views

To curve text in a polar plot in matplotlib we can take the following stepsStepsSet 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 the line with some ... Read More

How get the (x,y) position pointing with mouse in an interactive plot (Python Matplotlib)?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 08:36:26

4K+ Views

To get the (x, y) positions pointing with mouse in an interactive plot, we can take the following stepsStepsSet the figure size and adjust the padding between and around the subplots.Create a new figure or activate an existing figure.Bind the function *mouse_event* to the event *button_press_event*.Create x and y data ... Read More

How to put xtick labels in a box matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 08:29:23

445 Views

To put xtick labels in a box, we can take the following stepsStepsCreate a new figure or activate an existing figure.Get the current axis of the figure.Set the left and bottom position of the axes.Set the position of the spines, i.e., bottom and left.To put xtick labels in a box, ... Read More

How to plot a time as an index value in a Pandas dataframe in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 08:28:32

2K+ Views

To plot a time as an index value in a Pandas dataframe in matplotlib, we can take the following stepsStepsSet the figure size and adjust the padding between and around the subplots.Create a Pandas dataframe with two columns, time and speed.Set the DataFrame index using existing columns.To display the figure, ... Read More

How to remove the axis tick marks on a Seaborn heatmap?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 08:26:36

5K+ Views

To remove the axis tick marks on a Seaborn heatmap, we can take the following stepsStepsSet the figure size and adjust the padding between and around the subplots.Create random data points with 4×4 dimension.Plot the rectangular data as a color-encoded matrix.Use tick_params() for changing the appearance of ticks and tick ... Read More

Make logically shading region for a curve in matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 19-Oct-2021 08:25:07

143 Views

To make logically shading region for a curve in matplotlib, we can take the following stepsStepsSet the figure size and adjust the padding between and around the subplots.Create t, s1 and s2 data points using numpy.Create a figure and a set of subplots.Plot t and s1 data points; add a ... Read More

Previous 1 ... 6 7 8 9 10 ... 117 Next
Advertisements