Jake Vanderplas
Jake Vanderplas
That would require setting the ``'legend'`` property of the associated encoding to ``None``: ```python data = pd.DataFrame({'x': np.arange(5), 'y': np.arange(0, 10, 2)}) plot = data.vgplot.line() plot.spec['encoding']['color']['legend'] = None plot.display ```...
Thanks @domoritz – a few thoughts: > Do we support the method-style API for nested properties or just encodings? Up until now we've supported limited method-style APIs for top-level objects...
@iliatimofeev that sort of specification was available in Altair v1, but we abandoned it in later versions.
It's always worked for arguments of ``chart.encode()``, but only worked for encoding channel arguments in Altair v1. The main reason we dropped it is because it became difficult to implement...
Thanks for the input, @ellisonbg. Philosophically, I like the "verb/noun" construct we started with, but note that it breaks down almost immediately when applied to the Vega-Lite schema (transform/transform and...
> If we go with the method chaining, what is the API for mutating an existing spec. Let's say I want to take the spec above, and change the x...
One option, which is admittedly a bit weird, would be to initialize each value with a setter function, and have that function replace itself with the value once it's called....
Right, that wouldn't work.
I think that broadly, the problem is that Altair was originally built on top of traitlets, and we've been slowly moving away from a traitlets-like model because it's fundamentally incompatible...
Thanks Brian - one possiblity I thought of: we could make any undefined attributes evaluate as a callable setter function. But then I could imagine users getting pretty confused by...