Re: [R] adding text to a plot created with strat.plot() from package rioja
On 21.08.2011 01:01, Jason Paul Joines wrote: I completely missed that entering just the function name prints the code for that function making it even easier to copy and create a custom version. Better use the original code as you did before: It preserves the comments. Anyway, best way would be to contribute your improvements back to the package. Best, Uwe Ligges Jason === Original Message Subject: Re: [R] adding text to a plot created with strat.plot() from package rioja From: Jason Paul Joines ja...@joines.org To: r-help@r-project.org Date: 2011.08.20.Sat.14:48:35 I'm pretty new to R and finding the responsible line would not have been obvious to me without your help. I downloaded the source for package Rioja and was surprised to see that each function was supplied in it's own file. That made it pretty straightforward to copy, modify, and use my own version of it. Still, it's going to take quite a while to get familiar with all of the graphical capabilities of R. Thanks, Jason === Original Message Subject: Re: [R] adding text to a plot created with strat.plot() from package rioja From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Jason Paul Joines ja...@joines.org Date: 2011.08.20.Sat.8:43:30 On 19.08.2011 18:40, Jason Paul Joines wrote: I have a plot created with strat.plot() from package rioja. When the plot is created with scale.percent=FALSE, each x axes is labeled at 0 and its maximum. However, when scale.percent=TRUE, the x axes are not labeled. I need to use scale.percent=TRUE and I need labels for the x axes. I have been able to add labels to the x axes with mtext but it is very tedious to find the correct position. Is there a better way to do this or a better way to find the desired coordinates than trial and error? Yes: You can change the code and suggest your improvements to the package maintainer, for example. The relevant line in that function obviously is: axis(side = 1, at = seq(0, colM[i], by = 10), labels = FALSE) Uwe Ligges Jason === __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] adding text to a plot created with strat.plot() from package rioja
On 19.08.2011 18:40, Jason Paul Joines wrote: I have a plot created with strat.plot() from package rioja. When the plot is created with scale.percent=FALSE, each x axes is labeled at 0 and its maximum. However, when scale.percent=TRUE, the x axes are not labeled. I need to use scale.percent=TRUE and I need labels for the x axes. I have been able to add labels to the x axes with mtext but it is very tedious to find the correct position. Is there a better way to do this or a better way to find the desired coordinates than trial and error? Yes: You can change the code and suggest your improvements to the package maintainer, for example. The relevant line in that function obviously is: axis(side = 1, at = seq(0, colM[i], by = 10), labels = FALSE) Uwe Ligges Jason === __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] adding text to a plot created with strat.plot() from package rioja
I'm pretty new to R and finding the responsible line would not have been obvious to me without your help. I downloaded the source for package Rioja and was surprised to see that each function was supplied in it's own file. That made it pretty straightforward to copy, modify, and use my own version of it. Still, it's going to take quite a while to get familiar with all of the graphical capabilities of R. Thanks, Jason === Original Message Subject: Re: [R] adding text to a plot created with strat.plot() from package rioja From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Jason Paul Joines ja...@joines.org Date: 2011.08.20.Sat.8:43:30 On 19.08.2011 18:40, Jason Paul Joines wrote: I have a plot created with strat.plot() from package rioja. When the plot is created with scale.percent=FALSE, each x axes is labeled at 0 and its maximum. However, when scale.percent=TRUE, the x axes are not labeled. I need to use scale.percent=TRUE and I need labels for the x axes. I have been able to add labels to the x axes with mtext but it is very tedious to find the correct position. Is there a better way to do this or a better way to find the desired coordinates than trial and error? Yes: You can change the code and suggest your improvements to the package maintainer, for example. The relevant line in that function obviously is: axis(side = 1, at = seq(0, colM[i], by = 10), labels = FALSE) Uwe Ligges Jason === __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] adding text to a plot created with strat.plot() from package rioja
I completely missed that entering just the function name prints the code for that function making it even easier to copy and create a custom version. Jason === Original Message Subject: Re: [R] adding text to a plot created with strat.plot() from package rioja From: Jason Paul Joines ja...@joines.org To: r-help@r-project.org Date: 2011.08.20.Sat.14:48:35 I'm pretty new to R and finding the responsible line would not have been obvious to me without your help. I downloaded the source for package Rioja and was surprised to see that each function was supplied in it's own file. That made it pretty straightforward to copy, modify, and use my own version of it. Still, it's going to take quite a while to get familiar with all of the graphical capabilities of R. Thanks, Jason === Original Message Subject: Re: [R] adding text to a plot created with strat.plot() from package rioja From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Jason Paul Joines ja...@joines.org Date: 2011.08.20.Sat.8:43:30 On 19.08.2011 18:40, Jason Paul Joines wrote: I have a plot created with strat.plot() from package rioja. When the plot is created with scale.percent=FALSE, each x axes is labeled at 0 and its maximum. However, when scale.percent=TRUE, the x axes are not labeled. I need to use scale.percent=TRUE and I need labels for the x axes. I have been able to add labels to the x axes with mtext but it is very tedious to find the correct position. Is there a better way to do this or a better way to find the desired coordinates than trial and error? Yes: You can change the code and suggest your improvements to the package maintainer, for example. The relevant line in that function obviously is: axis(side = 1, at = seq(0, colM[i], by = 10), labels = FALSE) Uwe Ligges Jason === __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] adding text to a plot created with strat.plot() from package rioja
I have a plot created with strat.plot() from package rioja. When the plot is created with scale.percent=FALSE, each x axes is labeled at 0 and its maximum. However, when scale.percent=TRUE, the x axes are not labeled. I need to use scale.percent=TRUE and I need labels for the x axes. I have been able to add labels to the x axes with mtext but it is very tedious to find the correct position. Is there a better way to do this or a better way to find the desired coordinates than trial and error? Jason === __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.