question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sorting Colors with errorbars

See original GitHub issue

Hey, I’m trying to sort a colored plot with error bars and encounter an inconsistency/bug.

data = pd.DataFrame(
    [[2, 2, 1, 'a'],[3, 5, 1, 'b'],[4, 3, 1, "c"]],
    columns=['pump_freq', 'value', 'error', 'lipid']
)

base = alt.Chart(data).encode(
    alt.X('pump_freq:Q'),
    alt.Y(
        'value', 
    ),
    yError=alt.YError('error:Q'),
    color=alt.Color(
        'lipid', 
        sort=['b']
    )
)
chart = base.mark_point()+base.mark_errorbar()
chart

This will not sort due to the base.mark_errorbar(). If you remove it it will work though. Any suggestion what is going on?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joelostblomcommented, Feb 23, 2021

@deisi I am going through Altair issues to find those that have been resolved and can be closed. It looks to me like this issue has been solved so I am closing it, but please feel free to reopen and add a comment if there is something you don’t think is resolved yet.

0reactions
jakevdpcommented, Aug 2, 2019

#1636 fixes the issue of defining resolve_*() for charts where it shouldn’t be allowed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting Different error bar colors in bar plot in Matplotlib
It is used for data visualization purposes. In this article, we will be setting different error bar colors in the bar plot in...
Read more >
Error bars in different colors with matplotlib - Stack Overflow
I want the horizontal error bars to be one color, and the vertical ones another color. Is that possible? – Wild Feather. Dec...
Read more >
Change the color of error bars when using Around in ListPlot
1 Answer 1. Sorted by: Reset to default. Highest score (default) ...
Read more >
series.errorbar.color | highcharts API Reference
Determines what data value should be used to calculate point color if colorAxis is used. Requires to set min and max if some...
Read more >
8.7.3 Adding Error Bars to Your Graph - OriginLab
Specify how to skip error bars when drawing. Draw error bars as lines, with fill color between error bars and data. Use both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found