How to adjust y axis using seqmtplot in R?

I fight to determine the y axis of the graph using seqmtplot. I followed the steps described in the previous post ( How to configure the y axis using seqIplot in R? ). However, they do not seem to work for seqmtplot.

The y axis of my graph goes from 0 to 9, so I want it to display marks in intervals 1, i.e. 0, 1, 2 ... 9

I run these lines of code.

seqmtplot(LSAY.seq, group= , title="Mean time", yaxis=F) #axis(2, at=seq(from=0, to=9, by=1)) 

The problem is that the starting point of the y axis (i.e. 0) of my graph moved below the columns displaying the data.

Any ideas how I can fix this?

A second related question: how can I access the data underlying the graph created by seqmtplot?

Thanks in advance.

+4
source share
1 answer

You can control the length of the y axis with ylim= . For example, using the mvad.seq state mvad.seq defined in How to configure the y axis using seqIplot in R?

 seqmtplot(mvad.seq, title="Mean time", ylim=c(0,30)) 

To manage label marks, you need, as already explained in How to set up the y axis using seqIplot in R? , on

  • Disable y axis display with yaxis=FALSE
  • Disable legend with withlegend=F

and you must then build the legend separately. For instance:

 par(mfrow=c(1,2)) seqmtplot(mvad.seq, title="Mean time", yaxis=F, ylim=c(0,30), withlegend=FALSE) axis(2, at=seq(from=0, to=30, by=5)) seqlegend(mvad.seq) 

Available data available using

 seqmeant(mvad.seq) 
+2
source

Source: https://habr.com/ru/post/1501400/


All Articles