Question: I am using the rms package to perform Cox regression with age as restricted cubic splines with 4 knots, see reproducible code below from the rms package documentation.
My problem is: How do I change the y axis interval for the ggplot-output? I tried adding scale\_y\_continuous(limits = c(0,20)) but it didn't alter the axis

```
library(ggplot)
library(rms)

# NOT RUN {
# Simulate data from a population model in which the log hazard
# function is linear in age and there is no age x sex interaction

n <- 1000
set.seed(731)
age <- 50 + 12*rnorm(n)
label(age) <- "Age"
sex <- factor(sample(c('Male','Female'), n, 
                     rep=TRUE, prob=c(.6, .4)))
cens <- 15*runif(n)
h <- .02*exp(.04*(age-50)+.8*(sex=='Female'))
dt <- -log(runif(n))/h
label(dt) <- 'Follow-up Time'
e <- ifelse(dt <= cens,1,0)
dt <- pmin(dt, cens)
units(dt) <- "Year"
dd <- datadist(age, sex)
options(datadist='dd')
S <- Surv(dt,e)

f <- cph(S ~ rcs(age,4) + sex, x=TRUE, y=TRUE)
cox.zph(f, "rank")             # tests of PH
anova(f)
ggplot(Predict(f, age, sex, fun=exp)) + # plot age effect, 2 curves for 2 sexes
  scale_y_continuous(limits = c(0,20))

```

Answer: 
First, you'd be better off using packages. But if you really want/need to do it, you'd have to write platform-specific code code in the native language of the targeted platform (ie. Swift or Objective-C for iOS/Mac, Kotlin or Java for Android, etc), then use so-called [platform channels](https://docs.flutter.dev/development/platform-integration/platform-channels) to pass messages between your app and the platform-specific code.

If you'd like to get details about the device, on iOS you'd use [`UIDevice`](https://developer.apple.com/documentation/uikit/uidevice#//apple_ref/occ/cl/UIDevice), on Android you'd typically want [`Build`](https://developer.android.com/reference/android/os/Build).
This can only be done through Method Channel