All Questions
58
questions
0
votes
0
answers
13
views
Matplotlib not changing legend labels for a plot in python package pyAT
So I am attempting to use a python interface of Accelerator Toolbox (pyAT: link here) to simulate the path of a few particles through an energy spectrometer. From this interface, I've utilized a ...
0
votes
2
answers
61
views
legend in bokeh UMAP shows only one entry
Hi there I just managed to get this plot done in bokeh, so I imagine there are many things that could be improved. Nonetheless, what bothers me the most is that I cannot figure out how to have all ...
1
vote
1
answer
80
views
plotly title_side position not working properly
I'm greenhand with Python plots but I was trying to do a PCA for different human populations; while I'm still working on the actual data, the main issue I'm having with visualizations in Python, as ...
-1
votes
2
answers
1k
views
How to put legend outside the plot for a for 2 column plot definition? [duplicate]
I am trying to plot the legend outside a 2 columns 5 rows, but in this MWE 2 rows example in matplotlib. Turns out the legend to "lower center" puts the space between the two plots as well, ...
1
vote
1
answer
228
views
How to customize the handles and labels for a legend
I am trying to customize the ax from matplotlib plot. Here I am using a surpyval package to fit the data and then plot it. The plot method in surpyval package does not accept arguments other than the ...
0
votes
0
answers
75
views
How do I extract the shape of scatterplot legend entries?
I am trying to make a seaborn scatterplot with legend entries that combine color and shape. Rather than extract color and assign that to the shape entries like here, I want to extract the shape ...
0
votes
0
answers
283
views
How to deal with long legend labels when using multiple columns
It is necessary that the legend element can occupy several columns so that the legend does not stretch. It should work at any ncol value.
If you increase the length of the word "Some Line", ...
0
votes
1
answer
76
views
Related to legends for subplots in plotly
I have created the 4 subplots with the legends showing on right sideWhen I create subplots in plotly , legends are created either in right side or in the bottom of all subplots. But how can I get ...
0
votes
1
answer
212
views
How can I create a custom arrow-shaped legend key
I'm creating a plot using Matplotlib. I want the legend keys (the shapes next to the descriptive text in the legend) to be arrows similar to the ones present in the figure. I've been able to get an ...
0
votes
1
answer
291
views
Problem with handling multiple legends in subplots when you use plt.twinx()
I'm struggling to pass the list of my subplots with different scales on sides using plt.twinx() in each subplot to show all labels in a single legend box, but I get the following error:
...
0
votes
0
answers
154
views
matplolib legend elements bold: font size too big
I have a plot and would like to have some things in my legend bold. Unfortunately if I do this then the font size of the bold text is bigger than that of the rest. How can I keep the font size the ...
0
votes
1
answer
96
views
anchor two legends for the same plot in line one line
I have a plot with two legends that are not of the same height. I would like to place them such that their titles start at the same place on the y-axis. I know I could go and manually change ...
2
votes
1
answer
4k
views
Manually add legend entry to Seaborn Legend
I create overlaying distribution plots by group memberships using
gfg = sns.displot(hist_dat, x="Outcome", hue="Group", kind="kde", fill = True,
palette=...
0
votes
1
answer
1k
views
How to plot a barplot with different hatch and edge color with legends using matplotlib?
I would like to plot a barplot where bars have a different hatch and edge color using Matplotlib with its proper legends. I tried to plot but I couldn't generate proper legends with this code:
import ...
1
vote
1
answer
890
views
Adding multiple legends to multiple subplots
I am trying to display multiple legends within multiple subplots. Currently, I am able to create figures with subplots and display multiple legends within one plot but can't combine the two. They seem ...