Re: [R] ggplot y-axis labels are not continuous

2014-09-14 Thread Mohan Radhakrishnan
I have more control over labels using David's suggestion. scale_y_continuous(breaks=seq(min(df.melted$value)-2,max(df.melted$value),by=170) Thanks, Mohan On Mon, Sep 15, 2014 at 10:14 AM, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > options("scipen"=100, "digits"=4) > d

Re: [R] ggplot y-axis labels are not continuous

2014-09-14 Thread Mohan Radhakrishnan
options("scipen"=100, "digits"=4) df.melted$value<-as.integer(df.melted$value) I was not looking at the return type of 'format'. But these alternative work well. Thanks, Mohan On Sun, Sep 14, 2014 at 9:57 PM, David Winsemius wrote: > > On Sep 14, 2014, at 1:15 AM, Mohan Radhakrishnan wrote: >

Re: [R] ggplot y-axis labels are not continuous

2014-09-14 Thread David Winsemius
On Sep 14, 2014, at 1:15 AM, Mohan Radhakrishnan wrote: Thanks Dennis. df.melted$value<-as.numeric(df.melted$value) See the FAQ about converting factors to numeric. The more typical way of making that conversion is: df.melted$value<-as.numeric(as.character(df.melted$value)) ... although

Re: [R] ggplot y-axis labels are not continuous

2014-09-14 Thread Mohan Radhakrishnan
Thanks Dennis. df.melted$value<-as.numeric(df.melted$value) df.melted$value <- format(df.melted$value, scientific = FALSE) Mohan On Sun, Sep 14, 2014 at 9:22 AM, Dennis Murphy wrote: > Hi: > > Try > > str(df.melted) > > I'm guessing value is a factor. It needs to be numeric or integer. > > De

[R] ggplot y-axis labels are not continuous

2014-09-13 Thread Mohan Radhakrishnan
Hi, This is the code to create a ggplot. The plot is rendered but the y-axis labels are not continuous. So the lines are split. Moreover multiple y-axis labels overwrite each other due to this. How can I fix this? If I try to set ylim I get " *Discrete value supplied to continuous scale"* libr