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

Slice indicator slips leftward with size #15

Open
jmclawson opened this issue Sep 16, 2018 · 0 comments
Open

Slice indicator slips leftward with size #15

jmclawson opened this issue Sep 16, 2018 · 0 comments

Comments

@jmclawson
Copy link
Contributor

When running rolling.classify(), larger slices send the slice indicator off to the left of the chart, eventually going far enough to disappear. The bug seems to affect slices proportionally, given the size of the slice compared to the size of the text.

In a text with 18717 words, I noticed the following:

  • with slices sized < 1623, the indicator will stay right of the vertical axis.
  • with slices sized >1622 and <1780, the indicator will overlap with the vertical axis.
  • with slices sized >1780, the indicator will be printed entirely to the left of the vertical axis.

In a text with 5000 words, this was the pattern:

  • with slices < 478, the indicator will stay to the right of the vertical axis
  • with slices > 477, the indicator will stay to the left of the vertical axis

I wish I could be more helpful by having discovered that it always crosses crosses over at a specific percentage threshold of slicesize/textlength, but I didn't notice a consistent pattern.

I've attached two output files showing the error at its ugliest. The first is the .PNG generated by stylo directly. In this image, the slice indicator is just barely visible: margin-error-png.

The second image is exported from RStudio's built-in plot viewer after first running the command par(xpd=TRUE) in the console to allow printing in the margins (to counteract legend truncating). In this image, the slice indicator is wholly visible, but it's not placed usefully on the chart: margin-error-xpd-true

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

1 participant