YuLab-SMU / ggbreak

:broken_heart: An implementation of scale functions for setting axis breaks of a 'gg' plot.
https://www.frontiersin.org/articles/10.3389/fgene.2021.774846
131 stars 4 forks source link

some problem in simultaneously add x and y breaks #65

Open taoliu111 opened 10 months ago

taoliu111 commented 10 months ago

There are some problem when i want to simultaneous break x axis and y axis. Some bug information couble be seen.

followed by an example: data <- data.frame( x = c(1, 2, 3, 4, 500), y = c(10, 20, 30, 40, 1000)) ggplot(data, aes(x, y)) + geom_point() + scale_x_break(breaks = c(5,450)) + scale_y_break(breaks = c(50,950))


Error in error_cnd(): ! Conditions must have named data fields**

**

dariotommasini commented 9 months ago

I also get this error. It would be nice to have breaks on both axes!

Error in `error_cnd()`:
! Conditions must have named data fields
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd, .file)