rplotquantreg

Can't display x and y labels, when plotting with the quantreg command


I'm trying to plot the result of the quantreg command, but the labels of the graph don't show up. I'm running this code:

plot(summary(qrg), parm="agua_esgoto", xlab = "Quantiles", ylab = "Piped water and sewage", main = "Figure 1")

This is the image that was returned:

enter image description here


Solution

  • The margins need to be set in order to see the y or x labels, you can check out the options under the vignette

    For example:

    data("engel")
    fm <- rq(foodexp ~ income, data = engel, tau = 1:9/10)
    
    plot(fm,parm=2)
    # no x or y labels can be seen
    

    enter image description here

    plot(fm, parm = 2, mar = c(5.1, 4.1, 2.1, 2.1), 
    main = "", xlab = "tau", ylab = "income coefficient")
    

    enter image description here