Skip to main content

All Questions

0 votes
0 answers
19 views

How to plot the legend with combined_plot (ggplot2)

I created this script to display some environmental impacts for my research. `legend_plot <- ggplot(data_longGW, aes(x = Crop_cycleGW, y = kg_CO2_eq, fill = Category)) + geom_bar(stat = "...
Guido Evangelista's user avatar
1 vote
1 answer
24 views

Showing or saving only the legend of a plotly figure

Given a plotly figure with traces and a legend, is there a way to only show the legend without any of the plot content? My use case for this: I'm exporting several images with the same legend. Instead ...
william_grisaitis's user avatar
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 ...
tfs563's user avatar
  • 1
0 votes
0 answers
26 views

ggplot legend in R not recognising aesthetic changes for label category with no data points

Consider the following image: Although the underlying dataset does not contain values below 0.1 degrees Celsius, I want to and still can force the legend to display the label and box for 'Below 0.1', ...
shogi's user avatar
  • 65
0 votes
1 answer
53 views

Force keys size to be smaller in multiple lines legend in ggplot

Is there any way to force legend key sizes to be independent from line height when we have legend text with multiple lines? I tried legend.key.height, ggtext::element_textbox_simple, and guides but ...
rez's user avatar
  • 338
0 votes
2 answers
59 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 ...
Matteo's user avatar
  • 209
1 vote
1 answer
76 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 ...
Matteo's user avatar
  • 209
0 votes
1 answer
237 views

ChartJS Customised tooltip and LegendText not displaying after version update

Earlier i was using 2.7.2 version of ChartJS, now im updating to 4.4.1 So in my chart i was creating customized tooltip and customized Legend text but after version update both are not working Here is ...
Aishwarya's user avatar
-1 votes
2 answers
955 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, ...
theprogressor's user avatar
1 vote
1 answer
216 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 ...
A.E's user avatar
  • 1,013
0 votes
1 answer
75 views

Separate out overlapping legend items ggplot()

The Issue I have a plot that has various lines and symbols. They are all coloured by location ID. This has resulted in the legend items overlapping. i.e. There are four symbols: circle, triangle, ...
Melanie Baker's user avatar
0 votes
1 answer
501 views

Using ggpattern with white pattern; fill and pattern different variables: How do I add a grey background to the pattern legend?

I am working on a graph and am using color and pattern for two different variables. I want the graph to have colored designs created by using a white pattern over the colored fills. (I tried making ...
Elizabeth W's user avatar
0 votes
0 answers
72 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 ...
Aristle Monteiro's user avatar
1 vote
1 answer
191 views

get legend labels (text) from ggplot

I am trying to extract the label text from a ggplot legend object, e.g. for this plot: library(ggplot2) (p <- ggplot(mtcars, aes(x=mpg, y=disp, color=as.character(cyl))) + geom_point()) I can ...
MartijnVanAttekum's user avatar
1 vote
1 answer
36 views

How can I match the colors of lines and legend entries in ggplot2?

I have a dataframe of some spectra (one x-value, several y-values) and want to plot them in one graph. For this purpose, I want to use ggplot. After some research, I found a way to do so, but I want ...
Excelsior's user avatar
  • 181

15 30 50 per page
1
2 3 4 5
17