Visitar URL original
axes collage by tacaswell · Pull Request #16603 · matplotlib/matplotlib · GitHub
The Wayback Machine - https://web.archive.org/web/20200527112038/https://github.com/matplotlib/matplotlib/pull/16603
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axes collage #16603

Open
wants to merge 51 commits into
base: master
from
Open

axes collage #16603

wants to merge 51 commits into from

Conversation

@tacaswell
Copy link
Member

tacaswell commented Feb 28, 2020 •

PR Summary

This is an attempt at implementing a nicer API for laying out complex axes schemes like patchwork for ggplot. This is following on from a conversation @anntzer and @story645 had a few weeks ago
https://hackmd.io/4zWKhuLXQ16Y_oUfi9hnKA#Gridspec-Easy-API and was done on a red-eye flight home

The big win here is things like

x = [["A", "A", "B"], ["C", "D", "B"]]
fig = plt.figure()
axes = fig.build_grid(x)
axes['A'].plot(...)

do what you expect.

open questions:

  • Name (Hannah suggested something riffing to "collage" which I think is good if we can make it a verb)
  • does this go in Matplotib or does this go in a small library under the mpl org?
  • better tests of things going wrong
  • be sure that when re-assigning grid specs we clean up all the evidence of the old one (to be sure constrained layout works etc)
  • do we want the expansion logic to work ([['A'], ['B', 'C']] <-> [['A', 'A'][ ['B', 'C']])
  • keys in return dict when adjusting existing axes
  • provide a way to have mixed subplot_kw to each of the created figures

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
@tacaswell tacaswell requested review from story645 and anntzer Feb 28, 2020
For example ::
x = [['A', 'A', 'B'],
['C', 'D', 'B']]

This comment has been minimized.

Copy link
@anntzer

anntzer Feb 28, 2020

Contributor

do you also want to support

x = ['AAB',
     'CDB']

?

This comment has been minimized.

Copy link
@tacaswell

tacaswell Feb 28, 2020

Author Member

I suggested that and the argument @story645 had against it is that we should be encouraging long names like

x = [['map', 'histogram'], 
     ['time_series', 'time_series']]

This comment has been minimized.

Copy link
@tacaswell

tacaswell Feb 28, 2020

Author Member

but, that said, I suspect that could be implemented in the same pre-processing of the input that we would need to do for the auto-expanding logic.

This comment has been minimized.

Copy link
@anntzer

anntzer Feb 28, 2020

Contributor

but that still works, the point is to support List[str] vs List[List[str]]
I don't have a really strong opinion there though

This comment has been minimized.

Copy link
@story645

story645 Mar 2, 2020

Member

if we support strings of arbitrary length, then how do we know that ["ABCD"] is ["A", "B", "C", "D"] vs ["AB", "CD"]?

This comment has been minimized.

Copy link
@story645

story645 Apr 27, 2020

Member

What's the deterministic parse rule on that? Single letter equals 1 subplot?

This comment has been minimized.

Copy link
@tacaswell

tacaswell Apr 27, 2020

Author Member

Yeah, you either pass in a single string or a list.

    @staticmethod
    def _normalize_grid_string(layout):
        return [list(ln) for ln in layout.strip().split('\n')]

This comment has been minimized.

Copy link
@story645

story645 Apr 27, 2020

Member

So the point I could be clearer in making is the docs have to be 100 percent explicit that for string input, each character (excluding new lines and , ) is parsed as a subplot.

This comment has been minimized.

Copy link
@thesamovar

thesamovar Apr 27, 2020

First of all - thanks for looking at that gist - would love to see this in matplotlib. I'd definitely encourage you to include the multi-line string approach because even though it's not super-generalisable it covers a very common use case for scientists preparing figures.

Two other random notes:

  1. I updated my gist so that you can now use a '.' to indicate an empty axis because then I don't have to worry about spaces.
  2. If you can find a good way to add the panel labels so that they align correctly with tight_layout even with different axis sizes without having to do any fiddling, that would be amazing. There might already be a good way of doing this but I've never figured it out. My current solution in the gist sort of works but is a bit hacky and the alignment isn't quite right (the letters should line up on the left not the right).

Thanks for all your work on matplotlib - it's very much appreciated.

This comment has been minimized.

Copy link
@jklymak

jklymak Apr 27, 2020

Contributor

constrained_layout handles empty gridspec slots by placing invisible axes in the empty slots.

lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
@anntzer
Copy link
Contributor

anntzer commented Feb 28, 2020

I wouldn't want autoexpansion of [['a'], ['b', 'c']] to [['a', 'a'], ['b', 'c']].
Didn't check all the edge cases but I think the base idea is fine. I like returning the dict (makes it easy to manage plenty of axes semantically).

Perhaps could go in as provisional/unstable API? (I think we should try provisional APIs more :-))

@ImportanceOfBeingErnest
Copy link
Member

ImportanceOfBeingErnest commented Feb 28, 2020

Great! Quick thoughts:

  1. Could it also take arrays of numbers in, instead of strings? Those would be much easier to generate.

  2. Can it take None to create an empty space? I.e.

    [[None, "A", "A", None],
    ["B", "B", "C", "C"],
    [None, "D", "D", None]]
    

    creating
    image

  3. Should it allow for sharing? In the sense of allowing to share "A", with "B", but not with "C"?

@tacaswell
Copy link
Member Author

tacaswell commented Feb 28, 2020

Could it also take arrays of numbers in, instead of strings? Those would be much easier to generate.

Would the number just be labels or would the also be used to size the axes?

Can it take None to create an empty space? I.e.

That is very clever and a good idea

Should it allow for sharing? In the sense of allowing to share "A", with "B", but not with "C"?

I don't see any way to spell that API that does not turn into an unusable knot very quickly. Maybe we should push on (or just document if it is already possible and I don't know how to do it) to set up the shared axes after the fact.

@tacaswell
Copy link
Member Author

tacaswell commented Feb 28, 2020

I wrote this up on the plane because it was fun (I don't write much actual code anymore).

There was some question about how hard this would be (in my head) and some question if people think it is a good idea. With @story645 @anntzer and @ImportanceOfBeingErnest on board I think we have the answer to the second question and this code is too bad so I think we have the answer on the first.

If someone is super excited about this and wants to take over leading / championing its implementation feel free to do so!

@anntzer
Copy link
Contributor

anntzer commented Feb 28, 2020

see #15287 for post-creation sharing.

Copy link
Contributor

jklymak left a comment

This seems workable as long as the scope doesn't get out of control. As soon as you do this, people are going to want to add colorbar positioning, etc etc.

Not sure about the return dictionary versus just a list. I guess you have to do it this way so the order is unambiguous? It is a bit unexpected to have to deal with a dictionary, but maybe it has advantages too.

lib/matplotlib/tests/test_build_grid.py Outdated Show resolved Hide resolved
lib/matplotlib/tests/test_build_grid.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
@ImportanceOfBeingErnest
Copy link
Member

ImportanceOfBeingErnest commented Feb 29, 2020

Could it also take arrays of numbers in, instead of strings? Those would be much easier to generate.

Would the number just be labels or would the also be used to size the axes?

I don't see how to use numbers for sizes in a reasonable way, so this is really just a question of whether the user is expected to do np.array(...).astype(str) themselves or not.
For sizes one would probably need to fall back to the gridspec kw width_ratios and height_ratios.

Should it allow for sharing? In the sense of allowing to share "A", with "B", but not with "C"?

I don't see any way to spell that API that does not turn into an unusable knot very quickly.

Two options come to mind here:

  1. Another matrix with unique identifiers of shared axes, of the same shape as the input matrix, e.g.

    x = [["A", "A", "B"], ["C", "D", "B"]]
    sharex = [["U", "U", "V"], ["V", "U", "V"]]
    fig.build_grid(x, sharex=sharex)
    

    would share the x axes of A and D, as well as B and C .

  2. A list of shared axes identifiers, e.g.

    x = [["A", "A", "B"], ["C", "D", "B"]]
    sharex = [["A", "D"], ["B",  "D"]]
    fig.build_grid(x, sharex=sharex)
    

    for the same effect as above.

@tacaswell
Copy link
Member Author

tacaswell commented Feb 29, 2020

Not sure about the return dictionary versus just a list. I guess you have to do it this way so the order is unambiguous? It is a bit unexpected to have to deal with a dictionary, but maybe it has advantages too.

Once things are layout out in a complex ways it is not clear to me that there is an un-ambiguous order through them. Returning a dictionary is also stable under adding nesting layout and adding / removing other axes from the layout.

Two options come to mind here:

Option 2 seems better (you can easily opt-in to sharing a sub-set of the axes)

@anntzer
Copy link
Contributor

anntzer commented Feb 29, 2020

A dict is quite nice when working with complex layouts (at least personally I often stuff my axes in a dict anyways...).
Re: sharing: After #15287 you could just do

ax["A"].sharex(ax["B"])

and I guess we could even support sharing multiple axes at once (ax["A"].sharex([ax["B"], ax["C"]])), so I'm not sure this really warrants direct support in build_grid (in particular, I'm not sure the suggested solution is more readable...).

@tacaswell tacaswell force-pushed the tacaswell:enh_subplot_grid branch from bddeeb1 to 1ed1e3a Mar 1, 2020
@tacaswell
Copy link
Member Author

tacaswell commented Mar 1, 2020

Implemented @ImportanceOfBeingErnest 's two suggestions and @jklymak 's internal API usage suggestions.

@znstrider
Copy link

znstrider commented Mar 1, 2020

Hey, great job!

I wrote very similar code a couple days ago, in style of plt.subplots which allows you to simply do:
fig, ax = gs_from_array(layout)

I also accounted for None inputs.

Have a look here and feel free to adopt if it suits you:
https://gist.github.com/znstrider/a3b915f38e27e480640d695ac342adc1

@tacaswell
Copy link
Member Author

tacaswell commented Mar 1, 2020

Thanks @znstrider . np.argwhere definitely makes it simpler!

@dstansby dstansby added the New feature label Mar 1, 2020
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
lib/matplotlib/figure.py Outdated Show resolved Hide resolved
@tacaswell tacaswell force-pushed the tacaswell:enh_subplot_grid branch from 07c80a2 to e73c1a9 Mar 5, 2020
@tacaswell tacaswell added this to the v3.3.0 milestone Apr 22, 2020
@tacaswell tacaswell force-pushed the tacaswell:enh_subplot_grid branch from eba6a98 to f132088 Apr 27, 2020
def _normalize_grid_string(layout):
return [list(ln) for ln in layout.strip().split('\n')]

def build_grid(self, layout, *, subplot_kw=None, gridspec_kw=None,

This comment has been minimized.

Copy link
@jklymak

jklymak Apr 27, 2020

Contributor

named_subplots


x = [["A", "B"], ["C", "D"]]

y = [["F"], [x]]

This comment has been minimized.

Copy link
@jklymak

jklymak May 25, 2020 •

Contributor

OK, so what happens if I do y = [["F" [x]]["G", [x]]]? where the x subgrid spans the two rows? Not saying you have to support that, but it is valid to do gs_n = GridSpecFromSubplotSpec(gs[:, 1], nrows=2, ncols=2).

return [list(ln) for ln in layout.strip('\n').split('\n')]

def quilt_layout(self, layout, *, subplot_kw=None, gridspec_kw=None,
empty_sentinel='-'):

This comment has been minimized.

Copy link
@timhoffm

timhoffm May 25, 2020 •

Member

Patchwork uses '#' as empty sentinel. Is it intentional to use a different default?

Without having read the docs first, I have misinterpreted the example

-a-
bAc

as a spanning all columns (which may or may not be a reasonable extension). Point is, I'd recommend a less "directional" / "semantically connecting" character as the empty sentinel. Possible choices for the string case include:

  • # to mimic patchwork.
  • : space is an obvious choice but makes parsing a little harder (but AFAICS still managable)
  • .: If we don't want to add the extra effort for space-parsing, a period looks almost empty.

The natural sentinel for nested lists is None.

Additional remark: I wouldn't make the empty_sentinel configurable now. Keep it simple. I expect that most people can live with whatever default we choose and only few would spend the effort and clutter to define their own. Additionally, one can still work around if one cares a lot about the sentinel.

quilt_layout(
    """
    XaX
    bXc
    """.replace('X', '.'))

Finally, we can always add an empty_sentinel later if necessary.

This comment has been minimized.

Copy link
@tacaswell

tacaswell May 25, 2020

Author Member

Good point about - looking like "span" instead of "blank". I spent a while trying with whitespace as the blank, but it gets gnarly with both the de-denting we want to be able to do so you don't have to push these things against the left edge of the file and to work around editors having a "strip trailing whitespace" mode.

I think it is simpler to leave empty_sentinel configurable than to document that the sentinel is dependent on the type of the input (I had written that out, but decided I didn't like it before I pushed it). The reason the sentinel came in at all was @ImportanceOfBeingErnest request to be able to support integers (in numpy arrays).

@timhoffm
Copy link
Member

timhoffm commented May 25, 2020

My favorite names:

subplots_mosaic >> subplots_quilt > axes_mosaic > subplots_compose

Naming this subplots_* gives a strong hint that it's similar to the existing subplots method. And IMHO mosaic matches better than quilt. While quilt (to me) has a strong connotation of patterns, mosaic is more broadly a larger picture put together from smaller parts.

@moorepants
Copy link

moorepants commented May 25, 2020 •

I also still liked “named_subplots” because to me that is one of the cool features that it returns a dictionary keyed on the axes name (yes I was skeptical at first).

I also like "named_subplots".

Edit: My second choice would be "compose_axes"

@anntzer
Copy link
Contributor

anntzer commented May 25, 2020

Somewhat weak point for preferring something with "mosaic" over something with "quilt" (just comparing these two, not comparing with the other options): I think at least among French speakers, the number of people who understand the word "quilt" (Fr: "courtepointe") is waaaaay less than the number of people who understand the word "mosaic" (Fr: "mosaique").

@tacaswell
Copy link
Member Author

tacaswell commented May 25, 2020

    """
    .a.
    b.c
    """

vs

    """
    #a#
    b#c
    """

I think I like the . better.


I am sold on both 'mosaic' over 'quilt' and on including 'subplots' in some form.

I think the pool is down to

  • subplots_mosaic / mosaic_subplots
  • compose_mosaic / mosaic_compose
  • named_subplots
  • compose_axes / axes_compose
  • compose_subplots / subplots_compose

I think starting with subplots_ is nice so it is in presented as a tab-complete option near fig.subplots.

My current favorite is (agreeing with @timhoffm ) subplots_mosaic


Should probably export this to pyplot as well...

@moorepants
Copy link

moorepants commented May 25, 2020

I'm not a MPL developer, but for what it is worth, "mosaic" is a bit abstract wrt to MPL objects. When I hear that word I think of mosaics that artists create, not a structured layout or composure of axes to plot on. The language in MPL already has the words "subplot", "axes", "figure", etc. My vote would be to use the words MPL users are familiar with. All of these use terminogly that a MPL user would understand:

  • named_subplots
  • compose_axes / axes_compose
  • compose_subplots / subplots_compose
@tacaswell
Copy link
Member Author

tacaswell commented May 25, 2020

On the call we came to the consensus that it should start with subplot_ to get the tab-completion discovery which leaves us with:

  • subplot_tiles / subplots_tiles
  • subplot_tiled
  • subplot_by_name / subplots_by_name
  • subplot_mosaic / subplots_mosaic
  • subplot_compose / subplots_compose
  • subplots_grid
  • subplots_blueprint

mosaic : suggests too much like art, bit whimsical
tiled/tiles: suggests too regular, bit whimsical
by_name : pretty dry
compose: too generic
grid : dry, makes point it is coupled to gridspec

@efiring
Copy link
Member

efiring commented May 25, 2020

I second @jklymak's favoring of "subplot_mosaic". "subplot_grid" is another candidate now.

@brunobeltran
Copy link
Collaborator

brunobeltran commented May 25, 2020 •

I would say that while subplot_grid feels dry, emphasizing that this is just a gridspec under the hood feels like a good thing, since that concretely evokes what we're doing for those who know about gridspec (i.e. more specific mental image than "mosaic", "quilt", or "tiles"), and hints that something called gridspec exists to those who don't know about it yet.

That said, if we think that having the ability to return the GridSpec could be useful to users, then subplot_mosaic would allow us to add an analogous GridSpec.from_mosaic that returns the gridspec instead of the dictionary of axes.

So I'm +1 on either of those.

@jklymak
Copy link
Contributor

jklymak commented May 25, 2020

That said, if we think that having the ability to return the GridSpec could be useful to users, then subplot_mosaic would allow us to add an analogous GridSpec.from_mosaic that returns the gridspec instead of the dictionary of axes.

I don't think you would specify an actual GridSpec using a "mosaic". The point of the "mosaic" is to allow an easy way to specify sublotspecs that span rows or columns, e.g. [['A', 'B'], ['A', 'C']]. If you want the Gridspec you just do GridSpec(nrows=2, ncols=2).

@moorepants
Copy link

moorepants commented May 25, 2020 •

The bootstrap library refers to their layout specification as a "grid": https://getbootstrap.com/docs/4.5/layout/grid/, which has a similar functionality to this command.

@jklymak
Copy link
Contributor

jklymak commented May 26, 2020

WRT documentation, I wonder if it would be better if we had a new tutorial that was "laying out subplots" and discussed the various ways we do this in increasing complexity. i.e.

  • plt.subplot/fig.add_subplot
  • plt.subplots
  • fig.subplots_mosaic (or whatever)
    • plt.subplot2grid as well?
  • more complicated nests via direct recourse to gridspec and subgridspec
@tacaswell
Copy link
Member Author

tacaswell commented May 26, 2020

I don't disagree about a more broader tutorial, I don't think a holistic description of all of the ways to do it should block this PR.

@jklymak
Copy link
Contributor

jklymak commented May 26, 2020

Perhaps not, but you've added another tutorial, at a different level than the already existing tutorials that deal with the same subject. I'd suggest at least moving this tutorial to intermediate versus introductory since this is a bit advanced (not many people really need axes that span rows or columns)...

@story645
Copy link
Member

story645 commented May 26, 2020

@jklymak I think .subplots_* isn't a more advanced way of doing subplots, it's a semantically driven layout rather than index based. Even if you've got a 2*1 grid, there are advantages to using the mosaic version for keeping track of ordering.

@jklymak
Copy link
Contributor

jklymak commented May 26, 2020

Well thats a serious question. Are we going to start filling the docs with axs = subplots_mosaic() and access the dict by name, i.e. axs['lefthandplot']? The documentation aspects of this should be thought out, particularly if you think people will be doing this by default.

Though I find it a bit hard to imagine someone wanting this for straight grids of subplots: subplots_mosaic([['A', 'B', 'C'], ['D', 'E', 'F']) is a lot more painful than subplots(2, 3) and you lose the ability to iterate (easily) through the axes.

@story645
Copy link
Member

story645 commented May 26, 2020 •

Are we going to start filling the docs with axs = subplots_mosaic() and access the dict by name, i.e. axs['lefthandplot']?

more that like my next tutorial would totally be something like:

fig, axes = subplots_mosaic([['map', 'hist']['time', 'time']])
axes['time'].plot()

ok let's flip that:

fig, axes = subplots_mosaic([['time', 'time'],['map', 'hist']])
axes['time'].plot()

whereas the current way to do it is:

fig = plt.figure(constrained_layout=True)
gs = fig.add_gridspec(2, 2)
ax1 = fig.add_subplot(gs[0,0])
ax2 = fig.add_subplot(gs[0,1])
ax3 = fig.add_subplot(gs[1,:])

ax1.pcolormesh(d)
ax2.hist(d.flatten())
ax3.plot(d.flatten())
@jklymak
Copy link
Contributor

jklymak commented May 26, 2020

Again, spanning columns is "intermediate" usage.

@story645
Copy link
Member

story645 commented May 26, 2020

@jklymak but that's the point, we don't really want spanning columns to be intermediate usage 'cause this kind of composite plot is beyond common.

@story645
Copy link
Member

story645 commented May 26, 2020 •

but even if I forget spanning for a moment, I would do a tutorial with like:

fig, axes = plt.subplots_mosaic([['data', 'predicted',] ['lineregress',  'roc']])

'cause axes['roc'] is way easier to remember what it's supposed to be than axes[3]

@jklymak
Copy link
Contributor

jklymak commented May 26, 2020

Spanning rows and columns is more advanced than not spanning rows and columns. Yes, the point of this PR is to make that even simpler than it was, but it still is by definition more complicated.

If there are going to be a bunch of tutorials that have "semantically driven layout" for simple grids that have no axes spanning rows or columns, then I think we need to discuss how that will look in the docs, because I think it will be confusing to have yet another idiom sprinkled about.

For the more complicated column-spanning layouts, there are at least two other idioms that do not resort to gridspecs: ax3 = plt.subplot(2, 2, (3, 4)) and ax3 = plt.subplot2grid((2, 2), (1, 0), colspan=2) also do the same thing. Now we are adding a fourth way to do the same thing.

Which comes back around to my original point that getting all the idioms on the same tutorial would really help because then we could have some commentary about their plusses and minuses, and the user has a point of comparison versus something they found on the web from before the new way was available. I'm actually concerned about having a big long tutorial about this particular idiom, without it specifically referencing the other ones, particularly as this is so new.

@story645
Copy link
Member

story645 commented May 26, 2020 •

Which comes back around to my original point that getting all the idioms on the same tutorial would really help because then we could have some commentary about their plusses and minuses, and the user has a point of comparison versus something they found on the web from before the new way was available. I'm actually concerned about having a big long tutorial about this particular idiom, without it specifically referencing the other ones, particularly as this is so new.

I am 1000% on board with this, I just agree with Tom that it shouldn't hold up this PR and this feature by itself is intended to be introductory.

then I think we need to discuss how that will look in the docs, because I think it will be confusing to have yet another idiom sprinkled about.

I kind of agree with you here on the mixed idioms not being the greatest...but that we also want to preserve both styles.

@timhoffm
Copy link
Member

timhoffm commented May 26, 2020 •

a new tutorial that was "laying out subplots" and discussed the various ways we do this in increasing complexity. i.e.

getting all the idioms on the same tutorial would really help

#17376 is intended to go into that direction (but still needs a lot of additions to become a comprehensive tutorial). Anybody willing to work on this feel free to include the flowchart, modify it or come up with better illustrations. It may as well be worth creating such a diagram "by hand" because the amount of control in graphviz is limited.

@story645
Copy link
Member

story645 commented May 26, 2020

@ImportanceOfBeingErnest & @rougier are working on cheatsheets at matplotlib/cheatsheets & I wonder if #17376 might be a better fit w/ that - also maybe a separate something on axes creation

@jklymak
Copy link
Contributor

jklymak commented May 26, 2020

In the context of this PR, a) I think this method should be clearly marked experimental, to allow us to change it. b) I don't think its an introductory tutorial, and if anything this would be better as an (extended) example under subplots_and_figures.

Beyond this PR, I think something comprehensive should replace the 'arranging subplots with gridspecs' tutorial and the gory details of that gridspec tutorial go into "advanced".

@rougier
Copy link
Contributor

rougier commented May 27, 2020

By the way, there's also this MEP: #4384:

"AB"
┌────────┐┌────────┐
│ A      ││ B      │
│        ││        │
│        ││        │
└────────┘└────────┘

"ABB"
┌──────┐┌──────────┐
│ A    ││ B        │
│      ││          │
│      ││          │
└──────┘└──────────┘

"ABD"
"CCD"
┌───────┐┌───────┐┌───────┐
│ A     ││ B     ││ D     │
│       ││       ││       │
│       ││       ││       │
└───────┘└───────┘│       │
┌────────────────┐│       │
│ C              ││       │
│                ││       │
│                ││       │
└────────────────┘└───────┘

"AaBb"
┌───────┐┌─┐┌───────┐┌─┐
│ A     ││ ││ B     ││ │
│       ││ ││       ││ │
│       ││ ││       ││ │
└───────┘└─┘└───────┘└─┘

"  b  "
"aABCc"
            ┌───────┐
            └───────┘
┌─┐┌───────┐┌───────┐┌───────┐┌─┐
│ ││ A     ││ B     ││ C     ││ │
│ ││       ││       ││       ││ │
│ ││       ││       ││       ││ │
└─┘└───────┘└───────┘└───────┘└─┘
@jklymak
Copy link
Contributor

jklymak commented May 27, 2020

Yes I remember that MEP. Not sure I understand the discussion around colorbars, but I think the rest of it is what @tacaswell has implemented here.

@tacaswell
Copy link
Member Author

tacaswell commented May 27, 2020

@rougier sorry, I had forgotten about that MEP :(

I'll take another look at it tomorrow and see if we missed anything.

@rougier
Copy link
Contributor

rougier commented May 27, 2020

Original PR is 5 years old, I can understand you've forgotten it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.