Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlim problems in ageKeyPlot #10

Closed
droglenc opened this issue Feb 20, 2016 · 0 comments
Closed

xlim problems in ageKeyPlot #10

droglenc opened this issue Feb 20, 2016 · 0 comments
Assignees

Comments

@droglenc
Copy link
Contributor

Here is my question/problem with a reproducible example (end of e-mail). How do I set limits on the x and y-axis using alkPlot? In my example, I was purposefully trying to over restrict the x-axis to look at a specific area of the entire plot (sort of a quick subset) just so I could further my understanding of how I can use this plotting function. I used pages 70 and 101 of your book as an example for coding xlim. The documentation for alkPlot says xlim = “A numeric of length 2 that provide the limits for the x-axis or y-axis.” There were no examples in the help description for alkPlot that demonstrated manipulations of either the x-axis or the y-axis.

#Reproducible example

library(FSA) #version 0.8.5
Age3<-data.frame(Age =3,FL=round(rnorm(1000,580,45)))
Age4<-data.frame(Age =4,FL=round(rnorm(1000,750,45)))
Age5<-data.frame(Age =5,FL=round(rnorm(1000,865,45)))
df<-rbind(Age3,Age4,Age5)
df<-lencat(~FL,data=df,startcat=300,w=20,vname="Bin20")#20 mm bins

test<-xtabs(~Bin20+Age,data=df)
ALK.obs<-prop.table(test,margin=1)
ALK.obs
alkPlot(ALK.obs,showLegend=TRUE,xlim=c(500,800))
@droglenc droglenc self-assigned this Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant