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

JOSS review: gghistostats #577

Closed
kevinrue opened this issue Apr 21, 2021 · 6 comments
Closed

JOSS review: gghistostats #577

kevinrue opened this issue Apr 21, 2021 · 6 comments
Labels
invalid 🙅‍♂️ This doesn't seem right

Comments

@kevinrue
Copy link

I'm running into an error running some code from the README.

Namely

gghistostats(
  data = ggplot2::msleep, # dataframe from which variable is to be taken
  x = awake, # numeric variable whose distribution is of interest
  title = "Amount of time spent awake", # title for the plot
  caption = substitute(paste(italic("Source: "), "Mammalian sleep data set")),
  test.value = 12, # default value is 0
  binwidth = 1, # binwidth value (experiment)
  ggtheme = hrbrthemes::theme_ipsum_tw(), # choosing a different theme
  ggstatsplot.layer = FALSE # turn off ggstatsplot theme layer
)

The error is

Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  : 
  polygon edge not found
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  :
  no font could be found for family "Titillium Web"

I'm not sure yet whether the error relates to the polygon edge, the font that cannot be found, or both.


For openjournals/joss-reviews#3167

@IndrajeetPatil IndrajeetPatil added the invalid 🙅‍♂️ This doesn't seem right label Apr 21, 2021
@kevinrue
Copy link
Author

I solved it by installing the font from https://fonts.google.com/specimen/Titillium+Web

@kevinrue
Copy link
Author

I'll let you decide whether this should be documented anywhere, or whether it's OK to close the issue as it is.

@kevinrue kevinrue reopened this Apr 21, 2021
@kevinrue
Copy link
Author

Noted - hopefully this threads and the links that you provided will give other users good places to start looking for answers.

I came back to this thread because I just ran into a similar error again, because of another font missing on my computer

ggscatterstats(
  data = dplyr::filter(movies_long, genre == "Action"),
  x = budget,
  y = rating,
  type = "robust", # type of test that needs to be run
  xlab = "Movie budget (in million/ US$)", # label for x axis
  ylab = "IMDB rating", # label for y axis
  label.var = title, # variable for labeling data points
  label.expression = rating < 5 & budget > 100, # expression that decides which points to label
  title = "Movie budget and IMDB rating (action)", # title text for the plot
  caption = expression(paste(italic("Note"), ": IMDB stands for Internet Movie DataBase")),
  ggtheme = hrbrthemes::theme_ipsum_ps(), # choosing a different theme
  ggstatsplot.layer = FALSE, # turn off `ggstatsplot` theme layer
  marginal.type = "boxplot", # type of marginal distribution to be displayed
  xfill = "pink", # color fill for x-axis marginal distribution
  yfill = "#009E73" # color fill for y-axis marginal distribution
)
  no font could be found for family "IBMPlexSans"

Also, speaking about RStudio, from past experience, I noticed that resizing the "Plots" pane often helps, especially increasing the size of the pane, so that RStudio gets as much space as possible to fits margins.

@kevinrue
Copy link
Author

Also: users should make sure that they restart RStudio after installing new fonts.

@IndrajeetPatil
Copy link
Owner

Also, speaking about RStudio, from past experience, I noticed that resizing the "Plots" pane often helps, especially increasing the size of the pane, so that RStudio gets as much space as possible to fits margins.

That's a helpful tip, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid 🙅‍♂️ This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants