Results for subplot

November 20th, 2023

How do I a subplot to an existing figure?

Consider that I have a pre-existing figure like: from matplotlib import pyplot as plt fig, axes = plt.subplots(nrows=2, ncols=3) How can I add a 5th ...

November 20th, 2023

How do I add a subplot to an existing figure?

Consider that I have a pre-existing figure like: from matplotlib import pyplot as plt fig, axes = plt.subplots(nrows=2, ncols=3) How can I add a 5th ...

November 17th, 2023

How to create a stripplot with multiple subplots

This is my example data data = {'pro1': [1, 1, 1, 0], 'pro2': [0, 1, 1, 1], 'pro3': [0, 1, 0, 1], ...

October 25th, 2023

How to create a subplot for each category in a dataframe column

How to plot unique value in measurement i want to plot a line graph with 2 other columns from the csv file; df = pd.read_csv('test.csv', he...

August 31st, 2023

Plot specific dataframe columns as subplots via loop

I have a dataframe with columns including POSITION_x.VALUE, where x is 1 to 6. I have created a loop and carried out some statistical analysis to cre...

August 31st, 2023

Not able to resolve Error in subplot function

This is my code: subplot(2,2,1) x = linspace(0,10); y1 = sin(x); plot(x,y1) title('Subplot 1: sin(x)') subplot(2,2,2) y2 = sin(2*x); plot(x...

September 19th, 2023

How to combine 3d projections with 2d subplots and set the width

I have working code to generate plots showing x,y,z values for three parameters from an accelerometer, with side-by-side line and 3D plots for each: f...

September 9th, 2023

How to use adjust space between individual rows of a figure without applying it to all rows

I am trying to create a figure using matplotlib that contains 12 plots in total. The plots are distributed as follows: There are 3 columns, and 4 rows...

October 29th, 2023

Dual x-axis with same data, different scale

I'd like to plot some data in Python using two different x-axes. For ease of explanation, I will say that I want to plot light absorption data, which ...

October 27th, 2023

normal distribution curve doesn't fit well over histogram in subplots

I am using "plt.subplots(2, 2, sharex=True, sharey=True)" to draw a 2*2 subplots. Each subplot has two Y axis and contains normal distribution curve o...

September 7th, 2023

How to subplot a dictionary of dataframes

I would like to subplot 16 dataframes from a dictionary, but I tried with for loop but I don't how to finish my code with my DictDataFrame: DataFrameD...

October 29th, 2023

Different width subplots sharing same x-axis

I want 3 rows of subplots each of different widths, but which all share the same X-axis, such as in the rough mock-up below. How can I do this? Can I ...

September 9th, 2023

How to reduce the space between the axes and the first and last bar

There is a big space between the border/x-axe of the graph and the first and last bar in a bar plot in pyplot (red arrows in the first picture). In t...

September 7th, 2023

How to plot all dataframes from a dictionary of dataframes

I have lot of data, so to simplify : data = [[0.5, 1,'abcnews'], [0.4, 1.2, 'abcnews'], [0.8, 1.7, 'cnn'...

September 20th, 2023

Is there a way to add a second y axis to a subplot?

(I think) I know about the twiny/x function in matplotlib, but I am really struggling to figure out how to use this function in a subplot context. I h...

September 7th, 2023

Legend location in matplotlib subplot

I am trying to create subplots on (6X3) grid. I am having a problem with the location of legend. The legend is common to all subplot. The lgend is n...

October 17th, 2023

Show x-ticks on all subplots and unique y label

I am plotting two subplots that share the same x-axis but when I plot I only see the x-axis ticks on the second subplot. How can I make the x-ticks vi...

November 24th, 2023

What are the differences between add_axes and add_subplot?

In a previous answer it was recommended to me to use add_subplot instead of add_axes to show axes correctly, but searching the documentation I couldn'...

October 29th, 2023

Is it possible to show multiple plots in separate windows?

Hello I am plotting a function 10 times and also printing the separate values. I also wanted to plot all the 10 cases separately in separate windows....

October 17th, 2023

subplots from a multiindex pandas dataframe grouped by level

How I do multiple plot from a multi-indexed pandas DataFrame based on one of the levels of the multiindex? I have results from a model with different...

September 29th, 2023

Subplot for seaborn boxplot

I have a dataframe like this import seaborn as sns import pandas as pd %pylab inline df = pd.DataFrame({'a' :['one','one...

September 18th, 2023

How to remove the space between subplots

I am working on a project in which I need to put together a plot grid of 10 rows and 3 columns. Although I have been able to make the plots and arrang...

September 8th, 2023

get the subplot from pick event

I have a figure with four subplots, two of which are binded on a pick event, by doing canvas.mpl_connect('pick_event', onpick) where onpick is onpick(...

October 29th, 2023

Merge subplots with shared x-axis

I have two graphs to where both have the same x-axis, but with different y-axis scalings. The plot with regular axes is the data with a trend line d...

September 9th, 2023

Rotate tick labels in subplot

I am attempting to rotate the x labels of a subplot (created using GridSpec) by 45 degrees. I have tried using axa.set_xticks() and axa.set_xticklabel...

- 25881
How do I undo the most recent local commits in Git?

- 11618
How can I remove a specific item from an array in JavaScript?

- 20343
How do I delete a Git branch locally and remotely?

- 7387
How can I find all files containing a specific text (string) on Linux?

- 7330
How to find all files containing specific text (string) on Linux?

- 7611
How do I revert a Git repository to a previous commit?

- 2671
How do I create an HTML button that acts like a link?

- 8481
How do I check out a remote Git branch?