[R] Plotting time vs number

Jannis bt_jannis at yahoo.de
Wed Aug 28 14:00:05 CEST 2013


Hi Mohan,

i am not sure whether I understand your question correctly. Without 
beeing able to easily reproduce your plot, I would guess that the 
"breaks" come from the type='b' option you choose. When you use type 
='l', the line would be continuous (though the jumps would still be 
there). If you need the points as well, use points() to plot a point 
plot over the already existing line plot.


Does this solve your problem?

Jannis

On 28.08.2013 13:45, mohan.radhakrishnan at polarisft.com wrote:
> Hi,
>
>       The plot function draws a broken line. The graph breaks when it jumps
> from a lower value to a higher value with a big break in between. Why does
> this type of data not use 'pch' or 'type'.
>
> When I plot I don't indicate anywhere it is time.
>
>> head(data)
>        Time  Kbytes     RSS Dirty Mode
> 1 11:42:02 2691296 1599796    1582736
> 2 11:43:42 2691396 1599804    1582744
> 3 11:45:22 2691496 1599804    1582744
> 4 11:47:02 2691596 1599812    1582752
> 5 11:48:42 2691696 1599816    1582756
> 6 11:50:22 2691796 1599820    1582760
>
> plot(data$Time,data$Kbytes,type="b",col = "blue",  ylab="",
> xlab="",las=2,lwd=2.5, lty=1,cex.axis=1.5)
>
>
> Thanks,
> Mohan
>
>
> This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list