Linked Questions

175 votes
5 answers
407k views

I found the following example on matplotlib: import numpy as np import matplotlib.pyplot as plt x1 = np.linspace(0.0, 5.0) x2 = np.linspace(0.0, 2.0) y1 = np.cos(2 * np.pi * x1) * np.exp(-x1) y2 = ...
Heißenberg93's user avatar
49 votes
2 answers
113k views

I am trying to plot two countplots showing the counts of batting and bowling. I tried the following code: l=['batting_team','bowling_team'] for i in l: sns.countplot(high_scores[i]) mlt.show()...
user517696's user avatar
  • 2,672
16 votes
1 answer
13k views

I have constructed a set of pie charts with some help Insert image into pie chart slice My charts look wonderful, now I need to place all 6 of them in a 2x3 figure with common tick marks on the ...
CJD's user avatar
  • 319
3 votes
2 answers
29k views

I have plots like this fig = plt.figure() desire_salary = (df[(df['inc'] <= int(salary_people))]) print desire_salary # Create the pivot_table result = desire_salary.pivot_table('city', 'cult', ...
Arseniy Krupenin's user avatar
4 votes
2 answers
14k views

I'm plotting on two figures and each of these figures have multiple subplots. I need to do this inside a single loop. Here is what I do when I have only one figure: fig, ax = plt.subplots(nrows=6,...
Dr proctor's user avatar
3 votes
2 answers
13k views

I understand there are various ways to plot multiple graphs in one figure. One such way is using axes, e.g. import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([range(8)]) ax.plot(...) ...
Arne's user avatar
  • 309
0 votes
1 answer
8k views

I have the following code: def compare(f,a,b,c,d,n,points): """Plots 2 figures - one of the color map of f, and one of the color map of a rectangle [a,b] x [c,d], split into n^2 subareas, ...
Evan's user avatar
  • 2,096
0 votes
2 answers
8k views

I'm to Python and learning it by doing. I want to make two plots with matplotlib in Python. The second plot keeps the limits of first one. Wonder how I can change the limits of each next plot from ...
MYaseen208's user avatar
  • 24.1k
1 vote
2 answers
4k views

I come across the answer from this forum and have a question. How to show separate plot in one plot. Try to use plt.subplots(1, 4) but not work. Here is the sample codes: import matplotlib.pyplot as ...
VanN's user avatar
  • 17
1 vote
2 answers
3k views

I am learning visualization techniques in Python. I would like to plot two graphs vertically. Here is my code: import seaborn as sns import matplotlib.pyplot as plt kernel_avg_es_100 = sns.kdeplot(...
vojtam's user avatar
  • 1,265
0 votes
1 answer
3k views

I try to generate two scatterplots (side by side), and the code for that in matplotlib is quite straightforward and self-explanatory. however, my dataset is somehow complex, meaning for each x value, ...
sphero's user avatar
  • 37
1 vote
1 answer
3k views

In Jupyter Notebook, I write the following code, as MCVE: import matplotlib.pyplot as plt import numpy as np x1 = np.linspace(-1, 1, 50) for x in range(4): plt.figure() plt.plot(x1) plt....
zabop's user avatar
  • 8,112
0 votes
1 answer
2k views

How can we create mutiple boxplot at once using matplotlib or seaborn? For example, in a data frame I have numerical variable 'y' and 4 catergorical variables. So, I want 4 box plot for each of the ...
ash1's user avatar
  • 483
0 votes
2 answers
2k views

I want to arrange 5 histograms in a grid. Here is my code and the result: I was able to create the graphs but the difficulty comes by arranging them in a grid. I used the grid function to achieve that ...
reCaptcha's user avatar
1 vote
1 answer
3k views

Consider the following fake data: fake_data = pd.DataFrame( {"index": ["A", "B", "C"], 0: [0.1, 0.2, 0.3], 1: [2, 4, 6], 2: [1, 3, 5]} ) fake_data.set_index(...
Peter's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
10