Rishikesh Kumar Rishi has Published 1162 Articles

Turn off the left/bottom axis tick marks in Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 13:03:11

427 Views

To turn off the left or bottom axis tick marks in matplotlib, we can use length=0 for the axes.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot the x and y data points using plot() method.Use tick_params() method with ... Read More

Setting the spacing between grouped bar plots in Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 13:02:08

3K+ Views

To set the spacing between grouped bar plots in matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a dictionary for bar details to be plotted.Make a Pandas dataframe using dictionary, d.Plot the bar using dictionary, d, with align="center".To ... Read More

How to show two different colored colormaps in the same imshow Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 13:00:42

1K+ Views

To show two different colored colormaps in the same imshow matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make a 2D matrix of 5×5 dimension.Get masked matrix, data1 and data2, with positive and negative values.Create a figure and a ... Read More

How to make custom grid lines in Seaborn heatmap?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

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

4K+ Views

To make custom grid lines in Seaborn heatmap, we can use linewidths and linecolor values in the heatmap() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a Pandas dataframe with 5 columns.Use heatmap() method to plot the rectangular data as a color-encoded matrix.To display the ... Read More

How to plot scatter points in a 3D figure with a colorbar in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

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

3K+ Views

To plot scatter points in a 3D figure with a colorbar in matplotlib, we can use the scatter() and colorbar() methods.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 an axis as a subplot arrangement.Create ... Read More

Line colour of a 3D parametric curve in Python's Matplotlib.pyplot

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:51:08

300 Views

To plot the line color of a 3D parametric curve 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 axis as a subplot arrangement.To make a ... Read More

How to show mean in a box plot in Python Matploblib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:48:06

3K+ Views

To show mean in a box plot, we can use showmeans=True in the argument of boxplot() method.StepsSet the figure size and adjust the padding between and around the subplots.Create a random dataset.Create a new figure or activate an existing figure using figure() method.Add an axes to the current figure as ... Read More

How to shade points in a scatter based on colormap in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

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

519 Views

To shade points in a scatter based on colormap, we can use copper colormap in scatter() method.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y random 100 data points using numpy.Plot scatter points x and y with color=x and colormap=copper.To display the figure, ... Read More

How to use a custom png image marker in a plot (Matplotlib)?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

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

4K+ Views

To use custome png or jpg i.e an image as a marker in a plot, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make a paths list to store the directories of images.Make a list (x and y) of points.Using ... Read More

How to plot a 3D continuous line in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 03-Jun-2021 12:41:28

5K+ Views

To plot a 3D continuous line in 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 z data points using x and y data points.Create a new figure or activate an existing ... Read More

Advertisements