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.xts - left/right margins too wide for short series #85

Closed
joshuaulrich opened this issue Apr 25, 2015 · 0 comments
Closed

plot.xts - left/right margins too wide for short series #85

joshuaulrich opened this issue Apr 25, 2015 · 0 comments

Comments

@joshuaulrich
Copy link
Owner

For very short series (<10 observations) the left and right margins are so wide that you can't see the y-axis labels.

library(xts)
n <- 10
plot(.xts(1:n, 1:n), main=paste("n =",n))

image

joshuaulrich added a commit that referenced this issue Jul 13, 2017
The y-axis labels were being set based on a portion of the distance
between actual data observations. If the distance between observations
was large, the labels could be off the plot region. If the distance
between observations was small, the labels could overlap the axis.

Use the `offset` and `pos` arguments to `text()` to position the axis
labels appropriately and independent of the periodicity of the data.

Fixes #85.
@joshuaulrich joshuaulrich added this to the Release 0.10-1 milestone Jul 29, 2017
@joshuaulrich joshuaulrich added plot and removed plot labels Jul 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant