Jake Vanderplas

Results 527 comments of Jake Vanderplas

No, there is still no way to add a legend without specifying an encoding that the legend will represent.

What do you mean by “legend not based on a label”? How do you imagine specifying what the legend will contain?

Yes, in newer versions of vega-lite you can set encodings to a constant datum value, which will be used to populate the legend. Altair doesn't yet support this, though. In...

> when will this feature be available? What specifically are you asking about?

You can currently specify a color like `"orange"` using `color=alt.value("orange")`

You can define the color encoding's scale in the normal way; i.e. `scale=alt.Scale(domain=["My Line"], range=["orange"])`

No, there's currently no way to do that in Vega-Lite or Altair. The relevant feature request is here: https://github.com/vega/vega-lite/issues/1657

The reason the linked issue is relevant is because that's what discusses the feature in question: interactive scales and legends. Note that the original question is not about disabling y...

One thing you can do is set it so that one of the selections requires holding the shift key. There are some examples of this in the docs: [Composing Multiple...

Thanks for flagging this - it looks like the `to_dict()` method on encoding channels is not pure; see e.g. https://github.com/altair-viz/altair/blob/8ff06cfbbfb470aba6798999c61128be398c4996/tools/generate_schema_wrapper.py#L134-L142 (this is the template that is used for all auto-generated...