File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -273,9 +273,14 @@ setMethod(f = "get_preset",
273
273
}
274
274
)
275
275
276
- # Helper function to modify aesthetics (simplified version)
276
+ # Helper function to modify aesthetics using modifyList
277
277
.modify_aes = function (a , b ) {
278
- # This is a simplified version - in practice, this would properly merge ggplot2 aesthetics
279
- # For now, just return the first argument
280
- return (a )
278
+ # Use modifyList to merge ggplot2 aesthetics
279
+ # This properly handles nested aesthetic mappings
280
+ if (is.null(a )) return (b )
281
+ if (is.null(b )) return (a )
282
+
283
+ # modifyList will recursively merge the aesthetic mappings
284
+ # where b takes precedence over a for overlapping elements
285
+ return (modifyList(a , b ))
281
286
}
You can’t perform that action at this time.
0 commit comments