0

I try to make a figure by this script

dodge <- position_dodge(0.5)

original_results <- read.table(file="D:/input.dat", heade=T)
library(bear)
aa <- original_results
aa = aa[,-1]
aa.m =  melt(aa, id="minC")
dfc <- summarySE(aa.m, measurevar="value", groupvars=c("minC", "variable"))
dev.new(width=6, height=5)

ggplot(dfc, aes(x=minC, y=value, ymax=1, colour=variable, group=variable)) +
geom_errorbar(aes(x=minC, ymin=value-sd, ymax=value+sd), width=0.02,  position=dodge) + labs(title=titler) + 
geom_line(position=dodge) + 
geom_point(aes(shape=variable), size=3, position=dodge) +   
 theme_bw()

However, the result is not clear because dodge variable is not working Could you give me a little tip for handle this problem?

Data = link

enter image description here

kujungmul
  • 115
  • 1
  • 1
  • 7
  • 1
    Please provide data so we can run your code in order to make it a proper [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – MrFlick Mar 13 '15 at 03:21
  • Thank you I attached the data ! – kujungmul Mar 13 '15 at 03:29
  • I think you need to dodge by an amount that's consistent with your x-axis scale. Have you tried e.g. `dodge <- position_dodge(200)` ? – Ben Bolker Mar 13 '15 at 03:31
  • Oh my.......... you are right... I didn't think the x-axis scale. Thank you very much!!! – kujungmul Mar 13 '15 at 03:42

1 Answers1

0

I solved this problem by increasing position_dodge value .

Thankyou Ben bolker!

kujungmul
  • 115
  • 1
  • 1
  • 7