---------- Forwarded message ---------- From: Patrick Jackson <[EMAIL PROTECTED]> Date: Thu, Jul 3, 2008 at 11:40 AM Subject: Re: [R] graph woes To: Bert Gunter <[EMAIL PROTECTED]>
Well I will try my best. I can supply with with links to what I presently have and what I want. I also can send you code of what gnuplot is doing so that maybe if someone is versed in both areas that might now how to translate it to R. The image as I would like it: http://meroueh01.compbio.iupui.edu/images/SF_VP_BCqLSX6Q2.png The image as it is: http://meroueh01.compbio.iupui.edu/images/SF_VP_BCqLSX6Q.png The code that generates the gnuplot: set terminal png set size 0.75,0.75 set output "/home/pcjackso/SF_VP_BCqLSX6Q2.png" set title "DUD(cdk2)--Binding Curve" set xlabel "\% of compound database searched" set logscale x set xrange [.1:100] set xtics .1, 10, 100 set ylabel "\% of known ligands found" set yrange [0:100] set ytics 0, 20, 100 set key left top set key box plot "/tmp/binding_curve_data_BhVpAG.dat" us 7:1 title "USER" with steps, "/tmp/binding_curve_data_BhVpAG.dat" us 2:1 title "PMF" with steps,"/tmp/binding_curve_data_BhVpAG.dat" us 3:1 title "GOLD" with steps,"/tmp/binding_curve_data_BhVpAG.dat" us 4:1 title "CHEMSCORE" with steps,"/tmp/binding_curve_data_BhVpAG.dat" us 5:1 title "AUTODOCK" with steps,"/tmp/binding_curve_data_BhVpAG.dat" us 8:1 title "DOCK" with steps,"/tmp/binding_curve_data_BhVpAG.dat" us 6:1 title "DFIRE" with steps,37.04082*x title "Perfect Ranking", x title "Random Ranking" My current R code: control_Table <- c(0,2.04,4.08,6.12,8.16,10.2,12.24,14.29,16.33,18.37,20.41,22.45,24.49,26.53,28.57,30.61,32.65,34.69,36.73,38.78,40.82,42.86,44.9,46.94,48.98,51.02,53.06,55.1,57.14,59.18,61.22,63.27,65.31,67.35,69.39,71.43,73.47,75.51,77.55,79.59,81.63,83.67,85.71,87.76,89.8,91.84,93.88,95.92,97.96,100,100) p_PMF_Table <- c(0,0.06,1.05,1.32,1.98,6.89,8.87,9.2,9.81,11.57,12.18,13.66,13.99,14.38,15.1,15.87,19.34,19.94,20.33,20.44,20.88,21.05,24.57,24.74,25.18,25.23,27.82,28.76,30.91,32.07,34.05,35.15,35.26,37.85,39.89,40.17,44.35,45.12,51.63,58.02,64.85,65.56,67.22,73.39,76.53,82.37,82.64,86.39,87.27,88.32,100) p_GOLD_Table <- c(0,0.06,0.11,0.17,0.22,0.94,1.21,1.27,1.87,1.98,2.64,5.9,7.71,8.32,10.52,11.41,12.01,12.18,13.11,15.32,18.02,19.28,20.22,20.94,22.59,23.69,27.44,29.86,32.89,34.77,35.43,39.23,41.49,45.56,45.84,51.13,51.18,52.62,54.66,57.85,61.16,61.6,66.94,67.77,68.26,71.96,75.54,78.84,88.04,99.5,100) p_CHEMSCORE_Table <- c(0,0.22,0.5,0.77,1.16,1.43,1.49,1.76,1.98,2.09,2.42,2.98,3.8,3.91,3.97,5.01,5.73,5.79,5.84,6.67,7.82,16.86,17.08,20.5,22.42,24.74,30.85,35.43,42.37,45.56,57.52,57.63,60.22,61.16,62.2,65.29,66.78,90.03,90.58,92.62,93.06,94.6,96.69,97.47,97.8,98.68,99.39,99.56,99.72,99.83,100) p_AUTODOCK_Table <- c(0,1.87,2.09,2.15,2.7,3.03,3.2,3.53,3.69,4.63,4.85,5.07,5.45,5.51,6.06,6.5,7.49,7.82,8.48,8.87,9.7,12.12,12.73,15.76,16.97,20.17,21.76,24.08,32.56,42.15,51.9,53.5,53.83,54.27,58.62,64.46,66.94,70.8,72.4,78.13,79.89,80.77,81.98,82.37,83.86,84.52,84.63,88.32,92.4,92.45,100) p_DOCK_Table <- c(0,0.06,0.11,0.88,0.94,02.59,04.63,06.78,07.00,08.93,10.08,13.39,17.08,20.11,23.47,24.63,33.77,36.03,38.02,38.57,42.09,42.15,42.42,44.96,46.61,53.06,57.19,60.55,61.65,64.24,66.50,69.70,73.06,79.39,80.06,82.53,83.64,86.17,86.23,90.25,91.41,96.69,98.02,98.18,98.79,98.90,99.01,99.61,99.89,100,100) p_DFIRE_Table <- c(0,0.06,0.11,0.17,0.22,0.28,0.33,0.39,0.44,0.5,0.55,0.61,0.72,0.83,1.38,1.93,2.37,2.87,5.67,14.27,21.76,28.04,29.04,51.24,52.34,58.68,70.74,71.96,77.74,87.93,90.8,92.23,92.51,92.89,94.1,95.15,96.58,97.08,97.91,98.35,98.9,99.39,99.45,99.67,99.72,99.78,99.83,99.89,99.94,100,100) p_USER_Table <- c(0,0.77,0.83,0.88,1.1,1.27,1.65,1.71,2.2,2.64,4.08,4.35,4.74,5.18,6.23,7.66,8.98,10.85,12.07,18.07,22.7,27.11,27.27,29.86,31.96,43.09,45.84,48.65,54.33,55.98,59.34,64.74,69.97,75.65,75.92,81.1,81.93,83.91,96.31,96.97,97.02,97.69,98.9,98.95,99.12,99.28,99.61,99.67,99.94,100,100) perfect_Table <- c(0,75.59,151.19,226.78,302.38,377.97,453.56,529.15,604.75,680.34,755.94,831.53,907.12,982.72,1058.31,1133.9,1209.5,1285.09,1360.68,1436.28,1511.87,1587.46,1663.06,1738.65,1814.24,1889.84,1965.43,2041.02,2116.62,2192.21,2267.81,2343.4,2418.99,2494.58,2570.18,2645.77,2721.37,2796.96,2872.55,2948.15,3023.74,3099.34,3174.93,3250.52,3326.11,3401.71,3477.3,3552.9,3628.49,3704.08,3704.08) par(cex = 0.75) plot(type = "s", x = p_USER_Table, y = control_Table, xlab = "% of compou-10,nd database searched", ylab = "% of known ligands found", main = "DUD(cdk2)--Binding Curve" , col = "#ff0000", pch = "20", log = "x") axTicks(side = 1, log = TRUE) points(type = "s", x = p_PMF_Table, y = control_Table, col = "#00c000") points(type = "s", x = p_GOLD_Table, y = control_Table, col = "#0080ff") points(type = "s", x = p_CHEMSCORE_Table, y = control_Table, col = "#c000ff") points(type = "s", x = p_AUTODOCK_Table, y = control_Table, col = "#00eeee") points(type = "s", x = p_DOCK_Table, y = control_Table, col = "#c04000") points(type = "s", x = p_DFIRE_Table, y = control_Table, col = "#eeee00") lines(type = "l", x = control_Table, y = perfect_Table, col = "#2020c0") lines(type = "l", x = control_Table, y = control_Table, col = "#ffc020") legend("topleft", c("USER", "PMF", "GOLD", "CHEMSCORE", "AUTODOCK", "DOCK", "DFIRE", "Perfect Ranking", "Random Ranking"), col = c("#ff0000", "#00c000", "#0080ff", "#c000ff", "#00eeee", "#c04000", "#eeee00", "#2020c0", "#ffc020"), lty = 1) I hope that I have included enough info so that someone can follow what I want done. Thanks, Patrick Jackson On Wed, Jul 2, 2008 at 6:22 PM, Bert Gunter <[EMAIL PROTECTED]> wrote: > Well, you are more likely to elicit help if you provide a SIMPLE > reproducible example that more clearly illustrates what you need help doing. > Few of us care to wade through such prolix code. (and more often then not, > when you do this, you'll figure it out without further help). > > Cheers, > Bert > > -----Original Message----- > From: Patrick Jackson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 02, 2008 2:03 PM > To: Bert Gunter > Subject: Re: [R] graph woes > > LOL > > opp my mistake. Yeah I never did mean for anyone to bare with me. > > though my questions are still open. Man I really need help with this > issue, ASAP. I got a boss not happy that his graphs don't look like > they did back when we used gnuplot to create the graphs. > > Thanks, > > Patrick Jackson > > On Wed, Jul 2, 2008 at 4:24 PM, Bert Gunter <[EMAIL PROTECTED]> wrote: >> Well, I might bear with you, but I certainly don't know you well enough to >> bare with you. >> >> English spelling is tough, nicht wahr? >> >> Cheers, >> Bert >> >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On >> Behalf Of Patrick Jackson >> Sent: Wednesday, July 02, 2008 12:21 PM >> To: r-help@r-project.org >> Subject: [R] graph woes >> >> 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 >> a. Also is there anyway to make sub tick marks? >> 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. >> >> 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 = >> "#eeee00") >> 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) >> dev_off() >> >> 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@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. >> >> > > ______________________________________________ R-help@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.