Python Forum
Plot several graphs on the same row
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plot several graphs on the same row
#1
Hello,
Here is a code that I use to plot multiple boxplots at the same time :

for year in [2016,2017,2018,2019,2020,2021] :
    plt.figure(figsize=(5,10))
    sns.boxplot(
        data=CR,
        x='Code_Sexe',
        y='PM_FIN_{}_ECR'.format(year),showfliers = False,showmeans=True)
Where Code_Sexe is binary (1,2) and PM_FIN_2016_ECR is a numeric variable.

Which gives me the output in attachment with 6 graphs on the same column. I would like to have instead, 3 columns and two rows, with 3 graphs on the same row.


Thank you by advance !

Mathis

Attached Files

Thumbnail(s)
   
Reply
#2
https://www.tutorialspoint.com/plot-mult...matplotlib
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Plot several graphs in one plot Ferdiss 1 193 Apr-11-2024, 08:37 PM
Last Post: deanhystad
  grouped bar graphs tobiasfw 1 1,410 Feb-22-2022, 02:25 PM
Last Post: deanhystad
  How to plot intraday data of several days in one plot mistermister 3 2,919 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  How to merge strings through graphs Den 6 3,451 Jun-29-2020, 07:07 AM
Last Post: Den
  Tranforming into .exe with Matplotlib (graphs) ericvrocha 0 2,922 Oct-14-2019, 06:54 PM
Last Post: ericvrocha
  Little Help With Graphs ericvrocha 5 3,184 Oct-14-2019, 12:07 PM
Last Post: buran
  How to plot vertically stacked plot with same x-axis and SriMekala 0 1,933 Jun-12-2019, 03:31 PM
Last Post: SriMekala
  Drawing graphs with matplotlib JRod 5 4,733 Jul-31-2017, 10:00 AM
Last Post: JRod

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020