Consider removing column name and = sign in legend
See original GitHub issueHi again @nicolaskruchten,
Something that puzzled me about the color
arg in the plot is that it includes the name of the column followed by an equal sign. Would you consider removing it and just let the value of the column in place? Here are a few reasons to support that point :
- It is not displayed in plotly by default
- It’s redundant information when we see
date=
orcountry=
it easy to infer by the value of the field - It takes some extra place, that is valuable, especially in the vertical orientation.
Also, for personal taste, I think equal sign does not play well outside equations and prefer :
instead.
Happy to discuss with you about it. Maybe there is an option that can disable it, that I am not aware of.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Remove column name from legend in pandas barplot
Remove column name from legend in pandas barplot ; 'batsman','non_striker' ; sum().unstack().fillna(0) ; 'bar',stacked=True ; True) plt.legend(loc=' ...
Read more >Show or hide a chart legend or data table - Microsoft Support
Show or hide a legend · To hide the legend, click None. Tip: To quickly remove a legend or a legend entry from...
Read more >powerKPI legend displaying the column name - Microsoft Power BI ...
I am having issues with the powerKPI visualisation (not powerKPI matrix) legend. It is displaying the column name after the measure name. How...
Read more >Working with legends—ArcMap | Documentation
When you use a single symbol for the features in a layer, the layer is labeled with the layer's name in the legend....
Read more >Use multiple columns in a Matplotlib legend - GeeksforGeeks
Read; Discuss; Courses; Practice; Video. Improve Article ... Here, k is the number of columns the legend should have in the graph. Example:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you just want to show the values in legend, you can use this:
like if you have something like:
Like:
so the below snippet will remove the “alert_role” and will show only values like cpu, clone,memory etc:
.for_each_trace(lambda t: t.update(name=t.name.split("=")[1]))
The output will be:
With the newest release, you can now easily change this after the fact with something like:
.for_each_trace(lambda t: t.update(name=t.name.replace("=",": ")))
For example: