I am trying to plot two variables fdr_new and fdr_old with different characters and color blue and o for fdr_old red and x for fdr_new below is what I have tried I do not see any red and x on my plot not sure what I am doing wrong (pasting only df.head())
df :
df = pd.read_csv('~/plot.txt', sep='\t')
df.head()
id1 fdr_new fdr_old
a 0.025673 0.004912
b 0.098444 0.002133
c 0.00003 0.000004
d 0.330957 0.302002
e 0.939168 0.932705
code:
coff.plot(x='fdr_new', y='fdr_old', style=['bo','rx'])
plot using code:
import pandas as pd
import seaborn as sns
%matplotlib inline
import matplotlib.pyplot as plt
%config InlineBackend.figure_format = 'retina'
rd = pd.read_clipboard()
rd.head()
id1 fdr_new fdr_old
0 a 0.025673 0.004912
1 b 0.098444 0.002133
2 c 0.000030 0.000004
3 d 0.330957 0.302002
4 e 0.939168 0.932705
rd.plot(x = 'id1', y = ['fdr_new','fdr_old'], style=['bo','rx'])
changing style did the job along with removing the import 'retina' command.
You can use multiple Y-axis parameters
This is a scatter plot where each point is coordinate pair consisting of one part from
fdf_new
and the other part fromfdr_old
. No point on this plot is from onlyfdr_new
orfdr_old
. Because yourfdr_old
is specified as your y-axis it is assumed as the series name and thats why you see it in the legend. But only the first style is used... because you only have one series of points.The only way I can see to reconcile what I think you are trying to do is to treat
fdr_old
andfdr_new
as separate timeseries.You can even put
id1
in the x-axis