[R] Remove plot axis values in dotplot graph
Jim Lemon
drj|m|emon @end|ng |rom gm@||@com
Wed Sep 12 01:14:14 CEST 2018
Hi Abou,
Surprisingly you can't omit the x axis in dotchart. This hack will work:
sink("dotchar_noax.R")
sink()
Edit the resulting file by joining the first two lines with the
assignment symbol (<-), delete the two lines at the bottom and comment
out the line "axis(1)".
source("dotchart.noax.R")
dotchart.noax(scores,cex=1.5, pch = 18, col=c(1:3), xaxt = "n", main="Dot Plot
child’s cough data", xlab="cough Scores")
library(plotrix)
staxlab(1,0:16)
I used "staxlab" so that you could have all of the labels 0:16.
Jim
On Wed, Sep 12, 2018 at 5:57 AM AbouEl-Makarim Aboueissa
<abouelmakarim1962 using gmail.com> wrote:
>
> Dear All:
>
> One more thing. I want to Remove the plot x-axis values in dotplot graph. I
> am trying to use xaxt = "n", but it seems NOT working. Also after removing
> the x-axis values, I want to use the command axis(1, at=0:16, cex.axis=1)
> to add x-axis values from 0 to 16, but it seems not working as expect.
>
>
>
> Honey.Dosage<-c(12,11,15,11,10,13,10,4,15,16,9,14,10,6,10,8,11,12,12,8,12,9,11,15,10,15,9,13,8,12,10,8,9,5,12)
>
> DM.Dosage<-c(4,6,9,4,7,7,7,9,12,10,11,6,3,4,9,12,7,6,8,12,12,4,12,13,7,10,13,9,4,4,10,15,9)
>
> No.Dosage<-c(5,8,6,1,0,8,12,8,7,7,1,6,7,7,12,7,9,7,9,5,11,9,5,6,8,8,6,7,10,9,4,8,7,3,1,4,3)
>
> scores<-c(Honey.Dosage,DM.Dosage,No.Dosage)
>
> min(scores)
> max(scores)
>
> dotchart(scores,cex=1.5, pch = 18, col=c(1:3), xaxt = "n", main="Dot Plot
> child’s cough data", xlab="cough Scores")
>
> axis(1, at=0:16, cex.axis=1.5)
>
>
>
>
> with many thanks
> abou
> ______________________
>
>
> *AbouEl-Makarim Aboueissa, PhD*
>
> *Professor of Statistics*
> *Graduate Coordinator*
>
> *Department of Mathematics and Statistics*
> *University of Southern Maine*
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
More information about the R-help
mailing list