-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Note
The following is related to early thoughts on package development. Please see the official package documentation for support.
I'm guessing this will just be a place to put ideas and discuss things ~ Ben
In the notes/proof_of_concept.py document, I provide some an example using svg. I have code for png as well, but currently, I think they have similar problems, and svg is better.
In either approach, a problem arises that you either need to rescale the images after they're created or have "small-than-expected" images situated in each block. For the later, examples of this can be examined by changing the proposed_scaling_both function to proposed_scaling and then changing the hjust and vjust parameters to examine different alignments.
When I was working on the png approach (though this applied to svg as well?) I imagined we could try to "recorrect" the text and object sizes (points, lines, etc) of the plots after knowing the scaling - though this is harder if the height and width scales are different.
I imagined this package trying have similar attributes to gridExtra, cowplot and patchwork.
General structure of each:
-
patchwork- allows for different "+", "|", "/" grammar to be used to combine graphics (https://patchwork.data-imaginist.com/articles/guides/assembly.html)
- allows for multiple depths of plot structure
- provides additive functions to define layouts
- allows for themes and objects to be generally changed
-
gridExtra- allows for defining of layout_matrix (like in the
notes/proof_of_concept.py's top, e.g.
np.array([[1,1,2,2], [1,1,0,0]])
- allows for title texts at top, bottom, left, right
- allows for varying width of rows and columns
- allows for defining of layout_matrix (like in the
-
cowpatch- allows for subplot titles / labels
- allows for different ways to define layouts than gridExtra (with text, e.g.
""" 1122 11## """