Rishikesh Kumar Rishi has Published 1162 Articles

Plot a vector field over the axes in Python Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:31:57

706 Views

To plot a vector field over the axes in matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make X, Y, T, R, U and V data points using numpy.Add an axes to the current figure and make it the ... Read More

How to plot two Pandas time series on the same plot with legends and secondary Y-axis in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:30:43

2K+ Views

To plot two Pandas time series on the sameplot with legends and secondary Y-axis, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a one-dimensional ndarray with axis labels (including time series).Make a dataframe with some column list.Plot columns A ... Read More

How does Python's Matplotlib.pyplot.quiver exactly work?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:29:09

170 Views

To work with quiver, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create vector cordinates using numpy array.Get x, y, u and v data points.Create a new figure or activate an existing figure using figure() method.Get the current axis using ... Read More

How to repress scientific notation in factorplot Y-axis in Seaborn / Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:27:44

5K+ Views

To repress scientific notation in factorplot Y-axis in Seaborn/Matplotlib, we can use style="plain" in ticklabel_format()method.StepsSet the figure size and adjust the padding between and around the subplots.Make a dataframe with keys, col1 and col2.The factorplot() has been renamed to catplot().To repress the scientific notation, use style="plain" in ticklabel_format() method.To display ... Read More

How to make axes transparent in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:26:21

3K+ Views

To make axes transparent 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.Axes' to the figure as part of a subplot arrangement.Set face color of ... Read More

How to name different lines in the same plot of Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:25:14

1K+ Views

To name different lines in the same plot of matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Make two lists of data points.Plot point1 and point2 using plot() method.Place a legend on the figure.To display the figure, use show() ... Read More

Drawing circles on an image with Matplotlib and NumPy

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:24:09

2K+ Views

To draw a circle on an image with matplotlib and numpy, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Read an image from a file into an array.Create x and y data points using numpy.Create a figure and a set ... Read More

How to change the legend fontname in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:22:28

561 Views

To change the legend fontname in matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x data points using numpy.Plot x, sin(x) and cos(x) using plot() method.Use legend() method to place the legend.Iterate legend.get_texts() and update the legend fontname.To ... Read More

Adding units to heatmap annotation in Seaborn

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:21:11

490 Views

To add units to a heatmap annotation in Seaborn, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a 5×5 dimension matrix using numpy.Plot rectangular data as a color-encoded matrix.Annotate heatmap value with %age unit.To display the figure, use show() ... Read More

How to color a Matplotlib scatterplot using a continuous value?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 04-Jun-2021 06:19:56

6K+ Views

To color a matplotlib scatterplot using continuous value, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x, y and z random data points using numpy.Create a figure and a set of subplots.Create a scatter plot.Draw a colorbar in an ... Read More

Advertisements