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

plot.time_series in timeSeries.R: Extending functionality for plotting #1

Closed
tscoleman opened this issue Jul 27, 2018 · 5 comments
Closed

Comments

@tscoleman
Copy link

I have a suggestion for slightly extending the functionality of plot.time_series, to allow passing of more arguments: "type", "lwd", "frame.plot", and "main". The reason is wanting to plot the time-series closer to the graphics of Tufte - something like the attached

SnowBroadTimeSeries.pdf

Would you be amenable to my sending you the changed code (so you can review) or my initiating a pull request?

Thomas

@lindbrook
Copy link
Owner

Thanks for your suggestions!

I’ll probably formally open the repository to pull requests with version >= 0.6.0. For now, I’d appreciate it if you’d email me your code. It’d helpful to see how you approached the problem.

@tscoleman
Copy link
Author

tscoleman commented Jul 28, 2018 via email

@lindbrook
Copy link
Owner

Your code should now work. You should be able pass most if not all the graphical arguments. Two caveats:

  1. You'll need to install 'cholera' version 0.5.0.9005, which is on GitHub. You may need to install the 'devtools' package:

install.packages("devtools")

And then:

devtools::install_github("lindbrook/cholera", build_vignettes = TRUE)

The changes will be on CRAN in version 0.5.1, but that won't be posted till mid-August.

  1. To get rid of the box around the plot, use bty = "n" (box type) instead of frame.plot = FALSE:

plot(timeSeries(), type = "h", bty = "n", pump.handle = FALSE,
main = "Death from Cholera, each day in 1854", lwd = 2, statistic = "deaths",
cex.main = 1.75, cex.axis = 1.75, cex.lab = 1.75)

@tscoleman
Copy link
Author

tscoleman commented Nov 4, 2018 via email

@lindbrook
Copy link
Owner

For what it's worth, there's an R function for that: citation("pkg")

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

2 participants