[R] graph woes

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jul 3 20:21:25 CEST 2008

On Thu, Jul 3, 2008 at 1:14 PM, Patrick Jackson <jackpat01 at gmail.com> wrote:
>>> 1.  the tick marks are not where I want them to be.  I want them at
>>> .1, 1, 10, and 100, but I'm get them at 0.1, 0.5, 1.0, 5.0, 10.0,
>>> 50.0, 100.0

axTicks does not do anything since that function simply computes
certain numbers and returns them.  It has no effect on the plot.  You want
to put xaxt = "n" as an arg to plot to suppress the axis and then:

	axis(1, at = c(0.1, 0.5, 1.0, 5.0, 10.0, 50.0, 100.0))

>>>     a.  Also is there anyway to make sub tick marks?

There are some examples in the example section of ?plot.zoo in
the zoo package.

>>> 2.  three of my curves are not coming out the way I want them to
>>>     a.  one of my plot line when using standard axis, shows up, but
>>> when I turn the log feature on for the x axis, it disappears, does
>>> anyone know why?
>>>     b.  I have two lines on this graph that are suppose to represent
>>> perfect curves, but they are only showing the upper portions of the
>>> curves.

You are trying to graph the log of 0 !


1. Replace your call to par with:

op <- par(...whatever...)

and then at the end


to reset it.

2. You may wish to specify text.width = 0.2 in the call to legend (or
other number) to control the legend width.

3. Please read the last line of every message to r-help and please try to
reduce your problems in all cases to the smallest problem that illustrates
it rather than posting your original.

4. check out ?matplot

More information about the R-help mailing list