0

I am plotting a pandas DataFrame using the following code:

plt.figure()
mrdDF.plot(marker='o')
sns.set_style('ticks')
plt.title('')
plt.ylabel('')
sns.despine(offset=10)

The trouble is that the legend always overlaps with my data, and it would be nice to have it separated. Is there a good way to do this? (I put a sample DF below for replication sake.)

Here is an example plot:

enter image description here

df = pd.DataFrame({
'TIII-106155250':{ 
'1':0.00251662,
'2':0,
'3':0.00241347,
'4':0.00243768,
'5':0,
'6':0.00247219},

'TIII-73379749':{ 
'1':0.00205438,
'2':0,
'3':0,
'4':0.00151039,
'5':0,
'6':0},

'p53-7577611':{ 
'1':0.00195602,
'2':0,
'3':0.00191894,
'4':0.00151039,
'5':0.0019979,
'6':0.00190637},

'p53-7577189':{ 
'1':0,
'2':0.00309131,
'3':0,
'4':0,
'5':0.00309892,
'6':0.00327909},

'IDH1-209113189':{ 
'1':0,
'2':0.00165085,
'3':0.00161834,
'4':0,
'5':0,
'6':0},

'TIII-11486703':{ 
'1':0,
'2':0,
'3':0.00250941,
'4':0.00327769,
'5':0,
'6':0},

'GATA1-48649788':{ 
'1':0,
'2':0,
'3':0,
'4':0.00137431,
'5':0.00233846,
'6':0},

'TIII-110541276':{ 
'1':0,
'2':0,
'3':0.00232704,
'4':0,
'5':0.0023681,
'6':0},

'TIII-124428743':{ 
'1':0,
'2':0,
'3':0.00167606,
'4':0,
'5':0,
'6':0.00188498}
})
Joe
  • 12,057
  • 5
  • 39
  • 55
The Nightman
  • 5,609
  • 13
  • 41
  • 74

0 Answers0