Question

In the former question,Ananda Mahto tell me how to create a striochart ,
it is better to change the x-coordinate from 0,2,4,6,8,10 (in graph1) into 0,1,2,3,4,5,6,7,8,9 (in graph2)
How to change it ?

set.seed(1)
A <- sample(0:10, 100, replace = TRUE)
stripchart(A, method = "stack", offset = .5, at = .15, pch = 19, 
       main = "Dotplot of Random Values", xlab = "Random Values")

What i want is graph2.png not graph1.png.

The graph1.png

enter image description here

The graph2.png

enter image description here

Was it helpful?

Solution

A <- sample(0:9, 100, replace = TRUE)
stripchart(A, method = "stack", offset = .5, at = .15, pch = 19, 
           main = "Dotplot of Random Values", xlab = "Random Values",xaxt="n")
axis(1, at = 0:9, labels = 0:9)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top