Question: I have the following code in order to read a text file line by line with nodejs:

```
var lineReader = require('readline').createInterface({
 input: require('fs').createReadStream('log.txt')
});
lineReader.on('line', function (line) {
  console.log(line);
});
lineReader.on('close', function() {
  console.log('Finished!');
});

```

Is there any way to start reading the file from a specific line?

Answer: 
I am not sure why you want the percentiles to be on the y-axis, but here is code that does what you want: 

```
library(dplyr)
library(shiny)
library(tidyr)
library(ggplot2)

# simulate some data 
df_foo = data_frame(
  percentile = seq.int(99),
  ATI = sort(rnorm(99)),
  BTI = sort(rnorm(99))
)

# UI
ui_foo = shinyUI(
  plotOutput("plot_foo")
)

# server
server_foo = shinyServer(function(input, output) {
  output$plot_foo = renderPlot({
    df_foo %>% 
    gather(key = var_name, value = value, -percentile) %>% 
    ggplot(aes(x = value, y = percentile, group = var_name, color = var_name)) + 
    geom_line() + 
    theme_bw()
  })
})

# run the server
shinyApp(ui = ui_foo, server = server_foo)

```

Your question is more fundamentally about how to plot multiple variables in `ggplot2` and you need to basically specify the `group` aesthetic in suitably reshaped data.
In order to plot both `BTI` and `ATI`, you need to define which one is plotted on which axis. In other words, you should tell `ggplot` that you would like both columns plotted, this is missing in your code, i.e. in `ggplot(incomedata, aes(x = BTI, y = PP))`. In this code you are asking BTI to be plotted on x axis and PP on y axis, and as far as I understand you do not want PP to be plotted at all.

Can you please try the code below and see if it does what you are expecting?

```
ggplot(incomedata, aes(x = BTI, y = ATI)) + 
    geom_point() + 
    coord_cartesian(xlim = ranges$x, ylim = ranges$y)

```