1

I am trying to change the y-axis to being horizontal so that it can be read easier for my talk. I am new to R and don't have a lot of experience with it.

This is my code:

first.value = pt(500, 1.127344, 1.561328)
space = (1 - first.value)/648
edges = seq(first.value + space, 1 - space, space)
value.edges = 1.561328*qt(edges, 1.127344)
data = read.table(file.choose())
observed = log(data$V1)
expected = log(value.edges)
plot(observed,expected, xlim =c(4,15), ylim = c(0,14), las =1)
abline(0,1)

My graph

I would like the word expected the same orientation as observed. Thank you!

Simply Ged
  • 8,250
  • 11
  • 32
  • 40
F.Mann
  • 13
  • 2
  • 1
    Please give a reproducible version of your data using `dput(your_data)` – jfeuerman May 06 '19 at 21:37
  • 2
    Does it matter to have my data, I just need help with the orientation of the y-axis. – F.Mann May 06 '19 at 21:42
  • 1
    Yes it matters because having the data allows us to actually do the problem in R. – jfeuerman May 06 '19 at 21:46
  • It's a file with about 600+ lines. I'm not sure how to include that here. I'm new to this website. – F.Mann May 06 '19 at 21:50
  • It is common practice to include a reproducible example of your problem when posting questions under the `r` tag. This not only saves us time when helping you diagnose your problem, it's polite and the process of creating this "reprex" (read: reproducible example) may help you solve your problem without asking the question in the first place. [Read here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for more info on how to recreate your problem (ie you don't /shouldn't post all 600+ lines of your code) – dylanjm May 06 '19 at 22:03

1 Answers1

3

Try this,

par(mar = c(6,6,6,3)) 
plot(1, las=1, ylab="") 
mtext(text="Test", side=2, line=4, las=1)  

You can change the values in par to your liking, put your data instead of the 1 in plot, add your x labels etc... Then use mtext to write the yaxis label

GooJ
  • 257
  • 3
  • 13