You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
textbox_grob has been incredibly useful for me, but I noticed that although name is listed as an argument in the documentation, assigning a name doesn't appear to have any impact on the gTree object that the function creates:
Input:
library(grid)
library(gridtext)
sample_textbox <- textbox_grob("I am a grob", 0.5, 0.5, 0.5, 0.5,
name = "grobname",
box_gp = gpar(fill = "gray90"))
grid.newpage()
grid.draw(sample_textbox)
sample_textbox$name
Output: [1] "GRID.textbox_grob.198"
On inspection of the source code, it appears that name = name is missing from the gTree creation at the end of the textbox_grob function, where it is included in richtext_grob. Is there a reason for this? It would be helpful for me to be able to name the gTree that is created by the function.
The text was updated successfully, but these errors were encountered:
No good reason, other than me being stubborn because I fundamentally dislike grid's grob naming system. (It's one of the reasons grid performance is poor.)
textbox_grob
has been incredibly useful for me, but I noticed that althoughname
is listed as an argument in the documentation, assigning a name doesn't appear to have any impact on the gTree object that the function creates:Input:
Output:
[1] "GRID.textbox_grob.198"
On inspection of the source code, it appears that
name = name
is missing from the gTree creation at the end of thetextbox_grob
function, where it is included inrichtext_grob
. Is there a reason for this? It would be helpful for me to be able to name the gTree that is created by the function.The text was updated successfully, but these errors were encountered: