I have a graph plotted in r.The x axis tickmarks are at 0,5,10. I need a graph with resolution of tickmarks at 0.1 interval.When i place tickmarks of 0.1 intervals using the following command axis(1, at=seq(0,5,0.1), cex.axis=0.7, las=2) I only get the tickmarks of 0.1 interval that are very closed placed in the graph.I need to increase the spacing between each tickmark. Please anyone help out this. -- View this message in context: http://r.789695.n4.nabble.com/axis-in-r-plot-tp4634199.html Sent from the R help mailing list archive at Nabble.com.
On Fri, Jun 22, 2012 at 7:51 AM, sathya7priya <sathya7priya at gmail.com> wrote:> I have a graph plotted in r.The x axis tickmarks are at 0,5,10. I need a > graph with resolution of tickmarks at 0.1 interval.When i place tickmarks of > 0.1 intervals using the following command ? axis(1, at=seq(0,5,0.1), > cex.axis=0.7, las=2) ?I only get the tickmarks of 0.1 interval that are very > closed placed in the graph.I need to increase the spacing between each > tickmark. Please anyone help out this.Ticks at 0.1 interval will be very closely spaced on an axis of length 5:> length(seq(0,5,0.1))[1] 51 There's no way to both have ticks at 0.1 and not have ticks at 0.1, which is what you seem to be asking. Why do you need that many ticks? Can you place them at .5 instead? Or larger? Otherwise I suppose you could just make a bigger graph. You don't provide reproducible (or any) code, so I have no idea what graphics device you're using and can't provide specifics. Sarah -- Sarah Goslee http://www.functionaldiversity.org
Perhaps you meant ... at=seq(0,5,1) ? S ________________________________________ From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of sathya7priya [sathya7priya at gmail.com] Sent: 22 June 2012 12:51 To: r-help at r-project.org Subject: [R] axis in r plot I have a graph plotted in r.The x axis tickmarks are at 0,5,10. I need a graph with resolution of tickmarks at 0.1 interval.When i place tickmarks of 0.1 intervals using the following command axis(1, at=seq(0,5,0.1), cex.axis=0.7, las=2) I only get the tickmarks of 0.1 interval that are very closed placed in the graph.I need to increase the spacing between each tickmark. Please anyone help out this. -- View this message in context: http://r.789695.n4.nabble.com/axis-in-r-plot-tp4634199.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
On 06/22/2012 09:51 PM, sathya7priya wrote:> I have a graph plotted in r.The x axis tickmarks are at 0,5,10. I need a > graph with resolution of tickmarks at 0.1 interval.When i place tickmarks of > 0.1 intervals using the following command axis(1, at=seq(0,5,0.1), > cex.axis=0.7, las=2) I only get the tickmarks of 0.1 interval that are very > closed placed in the graph.I need to increase the spacing between each > tickmark. Please anyone help out this. >Hi sathya7priya, I'm going to try mind reading again, so here is a possible solution. plot(1:5,xaxt="n") axis(1,at=seq(0,5,by=0.1),labels=rep("",51)) axis(1,at=1:5) Jim
I need to increase the size of the graph by increasing the spacing between each tickmarks. -- View this message in context: http://r.789695.n4.nabble.com/axis-in-r-plot-tp4634199p4634383.html Sent from the R help mailing list archive at Nabble.com.
I have the graph plotted with x axis(-50 to 250) and y axis (-50 to 500).I need the x axis values(-50 to 250) with spacing between two tick marks as 1or 0.1.The graph should be wider to get enough resolution. -- View this message in context: http://r.789695.n4.nabble.com/axis-in-r-plot-tp4634199p4634391.html Sent from the R help mailing list archive at Nabble.com.
Hi> > I have the graph plotted with x axis(-50 to 250) and y axis (-50 to500).I> need the x axis values(-50 to 250) with spacing between two tick marksas> 1or 0.1.The graph should be wider to get enough resolution.For the first case you shall have some special display as you will need at least 15000 pixels wide screen.> length(seq(-50,250,.1))[1] 3001 I assume 4-5 pixels between ticks as minimum spacing. For the second case it is slightly better, however still your screen resolution shall be at least somewhere near 2000 pixels.> length(seq(-50,250,1))[1] 301 According to Wikipedia 27-30 inch HD display can probably cope with your request. Regards Petr> > -- > View this message in context: http://r.789695.n4.nabble.com/axis-in-r- > plot-tp4634199p4634391.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.