Rishikesh Kumar Rishi has Published 1162 Articles

How can I convert from scatter size to data coordinates in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

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

262 Views

To convert from scatter size to data coordinates in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x and s data points using numpy.Create a figure and a set of subplots.Make a scatter plot with X and s, ... Read More

How to load a .ttf file in Matplotlib using mpl.rcParams?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 12:02:13

355 Views

To load a .ttf file in Matplotlib using mpl.rcParams, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Initialize the path for the .ttf file.Get an instance of a class for storing and manipulating the font properties.Set the font family with ... Read More

Scroll backwards and forwards through Matplotlib plots

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 12:01:51

1K+ Views

To scroll backward and forwards (left and right keys) through Matplotlib plots, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create curr_pos and y using numpy.Create a new figure or activate an existing figure using figure() method.Bind the function to ... Read More

How to increase the thickness of error line in a Matplotlib bar chart?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 12:00:56

1K+ Views

To increase the thickness of error line in a Matplotlib bar chart, we can use err_kw=dict() with their properties.StepsSet the figure size and adjust the padding between and around the subplots.Make a dictionary of bar details.Create a figure and a set of subplots.Use bar() method to make a bar plot ... Read More

How to plot a time series array, with confidence intervals displayed in Python? (Matplotlib)

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 12:00:25

3K+ Views

To plot a time series array, with confidence intervals displayed in Python, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Get the time series array.Initialize a variable, n_steps, to get the mean and standard deviation.Get the under and above lines ... Read More

How to plot a watermark image in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 11:59:44

1K+ Views

To plot a watermark image in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Return a sample data file using get_sample_data() method.Create a figure and a set of subplots.Plot the data points using plot() method, with alpha=0.7 and marker ... Read More

Different X and Y scales in zoomed inset in Matplotlib

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 11:59:19

995 Views

To show different X and Y scales in zoomed inset in Matplotlib, we can use inset_axes() method.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Add a subplot to the current figure.Plot x and y data points using plot() method.Create ... Read More

How to write your own LaTeX preamble in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 11:58:50

171 Views

To write your own LaTeX preamble 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 random data points using numpy.Plot x and y data points using plot() method. Use LaTex formatting for the label.label="$y=e^{x}$"Place a ... Read More

How to plot y=1/x as a single graph in Python?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 11:58:28

1K+ Views

To plot y=1/x as a single graph in Python, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create data points using numpy.Plot x and 1/x data points using plot() method.Place a legend on the figure.To display the figure, use show() ... Read More

How to change the separation between tick labels and axis labels in Matplotlib?

Rishikesh Kumar Rishi

Rishikesh Kumar Rishi

Updated on 17-Jun-2021 11:58:02

19K+ Views

To change the separation between tick labels and axis labels in Matplotlib, we can use labelpad in xlabel() method.StepsSet the figure size and adjust the padding between and around the subplots.Plot data points of a list using plot() method.Set the ticks on the axes.Set X and Y axes margins to ... Read More

Advertisements