File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 268268 aesthetics (@teunbrand , #2800 ).
269269* Stricter check on ` register_theme_elements(element_tree) ` (@teunbrand , #6162 )
270270* Added ` weight ` aesthetic for ` stat_ellipse() ` (@teunbrand , #5272 )
271+ * Fixed a bug where the ` guide_custom(order) ` wasn't working (@teunbrand , #6195 )
271272
272273# ggplot2 3.5.1
273274
Original file line number Diff line number Diff line change @@ -306,8 +306,9 @@ Guides <- ggproto(
306306 return (no_guides )
307307 }
308308
309- guides $ guides <- c(guides $ guides , custom $ guides )
310- guides $ params <- c(guides $ params , custom $ params )
309+ ord <- order(c(names(guides $ guides ), names(custom $ guides )))
310+ guides $ guides <- c(guides $ guides , custom $ guides )[ord ]
311+ guides $ params <- c(guides $ params , custom $ params )[ord ]
311312
312313 guides
313314 },
You can’t perform that action at this time.
0 commit comments