Previously, if the data being plotted contained NA values, and limits were not explicitly passed into this function, the automatically-calculated axis limits would be NA, which would cause the plots to render as monotone grey, and no scale would be drawn.
The solution is to call max(..., na.rm = TRUE), which tells the max() function to ignore NA values. In practice, users should carefully consider how to handle NA values on their end, but it doesn't hurt here to do the best we can with the data we've been given.
As always, I'm happy to discuss if you'd rather take a different approach here.
Previously, if the data being plotted contained NA values, and limits were not explicitly passed into this function, the automatically-calculated axis limits would be NA, which would cause the plots to render as monotone grey, and no scale would be drawn.
The solution is to call max(..., na.rm = TRUE), which tells the max() function to ignore NA values. In practice, users should carefully consider how to handle NA values on their end, but it doesn't hurt here to do the best we can with the data we've been given.
As always, I'm happy to discuss if you'd rather take a different approach here.