[R] graph woes

From: Patrick Jackson <jackpat01_at_gmail.com>
Date: Wed, 02 Jul 2008 15:21:20 -0400

Hey Gang,

Here is the situation. First of all I am a newbie, in the arena of R, so please bare with me. I am trying to make a plot with a series of plot lines that uses logs on the x axis, and when I plot it I am having a few odd things go on that I do not know how to correct.

  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
  2. Also is there anyway to make sub tick marks?
  3. three of my curves are not coming out the way I want them to
  4. 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?
  5. 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.

On all of these I am assuming that there are easy resolutions, but with me not knowing everything about R it isn't apparent to me what the problems are.

Here is my code:

        png(imageFilename, width = 480, height = 360)
        par(cex = 0.75)
        plot(type = "s", y = control_Table, x = p_USER_Table, xlab =

"% of compound database searched", ylab = "% of known ligands found",
main = title , col = "#ff0000", pch = "20", xlim = (0.1, 100), ylim = (0, 100), log = "x")
        axTicks(side = 1, log = True)
        points(type = "s", y = control_Table, x = p_PMF_Table, col = "#00c000")
        points(type = "s", y = control_Table, x = p_GOLD_Table, col = "#0080ff")
        points(type = "s", y = control_Table, x = p_CHEMSCORE_Table,
col = "#c000ff")
        points(type = "s", y = control_Table, x = p_AUTODOCK_Table,
col = "#00eeee")
        points(type = "s", y = control_Table, x = p_DOCK_Table, col = "#c04000")
        points(type = "s", y = control_Table, x = p_DFIRE_Table, col =

lines(type = "l", x = control_Table, y = perfect_Table, col = "#2020c0") lines(type = "l", x = control_Table, y = control_Table, col = "#ffc020") legend("topleft", ["USER", "PMF", "GOLD", "CHEMSCORE",

"AUTODOCK", "DOCK", "DFIRE", "Perfect Ranking", "Random Ranking"], col
= ["#ff0000", "#00c000", "#0080ff", "#c000ff", "#00eeee", "#c04000",
"#eeee00", "#2020c0", "#ffc020"], lty = 1)


BTW if my code looks a bit odd it is because I am actually programing through rpy, which is an interface that allows python to talk to R.

Thanks for all the help,

Patrick Jackson

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. Received on Wed 02 Jul 2008 - 19:28:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 19:30:59 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive