Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 sns point plot grouping
#1
Hi,
I have data contain two tools, three groups, my x-axis ID, y-axis is Time. I want to plot as follows:


data:

ID	      Group	      Tool	  Time
LK0P1	  Group1	  ToolA	  20
LK0P1	  Group2	  ToolA	  15
LK0P1	  Group3	  ToolA	  53
MMK9	  Group1	  ToolA	  45
MMK9	  Group2	  ToolA	  16
MMK9	  Group3	  ToolA	  42
TY90	  Group1	  ToolA	  36
TY90	  Group2	  ToolA	  19
AVBF	  Group1	  ToolB	  20
AVBF	  Group2	  ToolB	  15
AVBF	  Group3	  ToolB	  53
MMK9	  Group1	  ToolB	  45
MMK9	  Group2	  ToolB	  16
MMK9	  Group3	  ToolB	  42
TY90	  Group1	  ToolB	  36
TY90	  Group2	  ToolB	  19
1. Row1&col1 ToolA(Group1) x-axis: ID, y-axis:Time
1. Row1&col2 ToolB(Group1) x-axis: ID, y-axis:Time
3. Row2&col1 ToolA(Group2) x-axis: ID, y-axis:Time
4. Row2&col2 ToolB(Group2) x-axis: ID, y-axis:Time
5. Row3&col1 ToolA(Group3) x-axis: ID, y-axis:Time
5. Row3&col2 ToolB(Group3) x-axis: ID, y-axis:Time

I use below code, but it is not plotting any thing,



#%%
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(style="ticks", color_codes=True)
     
     
attend = pd.read_excel(r'D:\subplots2.xlsx')
g = sns.FacetGrid(attend, col="Tool", col_wrap=4, ylim=(0, 10))
g.map(sns.pointplot, "ID", "Time", order=[1, 2, 3], color=".3", ci=None);
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Counting and grouping Kudzo 0 222 Jan-27-2020, 01:30 AM
Last Post: Kudzo
  Grouping Integers mjack24 4 625 Feb-08-2019, 11:12 AM
Last Post: FranSPG

Forum Jump:


Users browsing this thread: 1 Guest(s)