Skip to main content

All Questions

0 votes
1 answer
332 views

How to avoid data disappearing from graph when click on the legend - React ECharts

I am trying to avoid the default click behavior on the legend of React ECharts. When the user click on any legend item, the corresponding plotted data disappear from the graph until the user click on ...
user2403607's user avatar
0 votes
1 answer
740 views

Rearranging legend order plotted using ggsurv for Kaplan Meier curves

I plotted Kaplan Meier curves for my data which is for 6 different treatments namely: 100Low 30Low 15Low 100High 30High 15High I want my legend to be in the sequence that I mentioned above however ...
Muhammad Usama Ashraf's user avatar
3 votes
1 answer
685 views

How to add legend elements in Matlab in the plot itself

I want to somehow label vertical lines in Matlab. I could imagine two options: Either by having legend entries right next to each vertical line itself, or by having the vertical lines numbered in the ...
LenaH's user avatar
  • 323
2 votes
1 answer
2k views

Changing legend position using Visreg package in R

I'm using Visreg to visualize a negative binomial general linear model with interaction terms. The problem I'm running into is that when using overlay=TRUE the legend noting which lines correspond to ...
Toby Armstrong's user avatar
1 vote
2 answers
3k views

Legends overlapping the plots in Rstudio

I am trying to plot an image and then overlay a legend on its top. The legend is covering the plot and I am not able to adjust it using different parameters like cex, lty, etc. plot(cov16_2ms04h$...
everestial's user avatar
  • 7,115
-2 votes
1 answer
2k views

How do I right-align text and symbols in my legend box

... when specifying "topright" & put symbols on right side of legend rather than to the left of the labels. Basically I want my legend to be in a box on the top right corner of my plot, and have ...
draj01100's user avatar
12 votes
2 answers
21k views

How can I add a 2-column legend to a Matlab plot? [duplicate]

Consider following code: t=0:.01:(2*pi); y=[sin(t);sin(t-pi/12);sin(t-pi/6);sin(t-pi/4)]; figure(1) clf subplot(6,1,5) plot(t,y) xlim([0 2*pi]) legend('1','2','3','4') It produces ...
Karlo's user avatar
  • 1,664