Dimitri Liakhovitski
2009-Apr-28 18:56 UTC
[R] Producing customized tickmarks when producing a graph using "curve"
Hello! I am using function "curve" to create a line graph. I was wondering, if it's possible to "turn off" the default tick marks and introduce those tick marks in specific locations. For example, currently in my X axis tick marks are (automatically) at 10, 11, 12, 13 but I want them to be in 5 specific locations, like 9.89, 10.34, etc. Any hint would be greatly appreciated! -- Dimitri Liakhovitski MarketTools, Inc. Dimitri.Liakhovitski at markettools.com
David Winsemius
2009-Apr-28 19:32 UTC
[R] Producing customized tickmarks when producing a graph using "curve"
It is possible in any of the flavors of graphics available in R.> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- David On Apr 28, 2009, at 2:56 PM, Dimitri Liakhovitski wrote:> Hello! > I am using function "curve" to create a line graph. > I was wondering, if it's possible to "turn off" the default tick marks > and introduce those tick marks in specific locations. > For example, currently in my X axis tick marks are (automatically) at > 10, 11, 12, 13 but I want them to be in 5 specific locations, like > 9.89, 10.34, etc. > > Any hint would be greatly appreciated! > -- > Dimitri Liakhovitski > MarketTools, Inc. > Dimitri.Liakhovitski at markettools.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.David Winsemius, MD Heritage Laboratories West Hartford, CT
Stefan Grosse
2009-Apr-28 19:56 UTC
[R] Producing customized tickmarks when producing a graph using "curve"
Dimitri Liakhovitski schrieb:> I was wondering, if it's possible to "turn off" the default tick marks > and introduce those tick marks in specific locations. >use search. rseek for example. use help. ?axis for example leads you to an example how to do so... (works also for curve) and please try to show at least that you had some effort when you post something. Stefan
Dimitri Liakhovitski
2009-Apr-28 20:44 UTC
[R] Producing customized tickmarks when producing a graph using "curve"
Dear Phil, thank you so much for refering me to the "axis" function. It helped me find the solution! Come on, guys, I was just asking for a pointer, not for a solution. Dimitri On Tue, Apr 28, 2009 at 3:37 PM, Phil Spector <spector at stat.berkeley.edu> wrote:> Dimitri - > ? First, suppress the xaxis tick marks by passing > > ? ? xaxt = 'n' > > to curve. ?Then use the axis function (with side=1) to > produce your axes. ? If you provide a reproducible example, I'm sure someone > will fill in the missing details. > > ? ?If you're going to use R for a lot of plotting, you'll > be well rewarded by looking at the help page for the par function. > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? - Phil Spector > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Statistical Computing Facility > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Department of Statistics > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? UC Berkeley > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? spector at stat.berkeley.edu > > > On Tue, 28 Apr 2009, Dimitri Liakhovitski wrote: > >> Hello! >> I am using function "curve" to create a line graph. >> I was wondering, if it's possible to "turn off" the default tick marks >> and introduce those tick marks in specific locations. >> For example, currently in my X axis tick marks are (automatically) at >> 10, 11, 12, 13 but I want them to be in 5 specific locations, like >> 9.89, 10.34, etc. >> >> Any hint would be greatly appreciated! >> -- >> Dimitri Liakhovitski >> MarketTools, Inc. >> Dimitri.Liakhovitski at markettools.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. >> >-- Dimitri Liakhovitski MarketTools, Inc. Dimitri.Liakhovitski at markettools.com
Bert Gunter
2009-Apr-28 20:57 UTC
[R] Producing customized tickmarks when producing a graph using"curve"
Come on, Dmitri, you could have found it yourself with help.search("tickmarks") or help.search("axis") ;-) Bert Gunter Nonclinical Biostatistics 467-7374> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Dimitri > Liakhovitski > Sent: Tuesday, April 28, 2009 1:44 PM > To: Phil Spector; R-Help List > Subject: Re: [R] Producing customized tickmarks when > producing a graph using"curve" > > Dear Phil, > thank you so much for refering me to the "axis" function. It helped me > find the solution! > Come on, guys, I was just asking for a pointer, not for a solution. > Dimitri >