legend

How to exclude series in legend (Flex)

一个人想着一个人 提交于 2019-12-06 03:53:44
问题 In flex charting, I want to draw something like "reference lines" which are related to specific series, therefore these lines are not independent series and should not be shown in legend. Is it possible to exclude some series from chart legend? Thanks! 回答1: I elaborated on Luis B's answer to make this dynamically reflect on the linechart's data provider. This way the legend only shows what fields are available in the chart. Kinda nifty. Here is what I came up with, and it works well:

AmChart legend in one line

只谈情不闲聊 提交于 2019-12-06 03:50:37
I'm trying to get AmChart chart legends into one line, but without luck. Legends are separated (one for line). Actual settings for from documentation http://docs.amcharts.com/3/javascriptcharts/AmLegend is following. "legend": { "equalWidths": false, //"periodValueText": "total: [[value.sum]]", "position": "bottom", "valueAlign": "left", "labelWidth": 100, "valueWidth": 200, //"width": 100, "align": "center" }, I Would like to ask how to get all chart legends into one line? Many Thanks for any advice. you can try legend{ "maxColumns": 1, } I think it auto resize follows width of div. Btw, You

how to place colorlegend (corrplot) in graphic

依然范特西╮ 提交于 2019-12-06 03:49:20
I am using corrplot to create a correlation heatmap, but I don't like the default legend - it is too big. So I was trying to use the colorlegend() to add the legend after I create the plot (and disable the default legend with cl.pos="n" ). Only problem is that I can't figure out how to change the position of the legend - it ends up on the lower left. Ideally, I could place it on the top right, but I looked through the options for colorlegend and plot and can't figure this out. For example: # load libraries and create color scale library(corrplot) library(RColorBrewer) scalebluered <-

Using annotate to place a text box below legend in Matplotlib

狂风中的少年 提交于 2019-12-06 03:12:51
I wish to display some text in a Matplotlib plot using annotate(), aligned beneath a legend box. I have examined the solution proposed in How to place a text box directly below legend in matplotlib? and can make an adaption that works for my situation, however adding additional axes etc. seems overkill for my situation. I simply wish to place an annotation whose top right corner is 20 pixels below the lower right corner of the legend box. I also wish to save a PDF files of the plot. Here is my code. import matplotlib.pyplot as plt import matplotlib.text fig, ax = plt.subplots() ax.plot([5,1],

R, ggplot2: creating a single legend in a bubble chart with positive and negative values

≡放荡痞女 提交于 2019-12-06 02:10:44
I want to create a single legend for a bubble chart with positive and negative values like in plot below , generated using sp::bubble(). But, for various reasons I want to duplicate this in ggplot2. The closest I have gotten is to generate a single legend with scaled symbols, but the actual bubbles themselves are'nt scaled. The above plot was created using the code below # create data frame x=sample(seq(1,50),50,T) y=sample(seq(1,50),50,T) plot_dat=data.frame(x=x,y=y,value=rnorm(50,0,25)) # plot library(ggplot2) ggplot(data=plot_dat, aes(x=x, y=y,colour=factor(sign(value)), size=value)) + geom

How to add a custom legend for geom_hline

时光总嘲笑我的痴心妄想 提交于 2019-12-06 00:10:12
Using the data below, notice the legend does not properly describe geom_hline: df<-data.frame( points=c(.153,.144,.126,.035, .037, .039, .010,.015,.07), days=gl(3,1,9,labels=c("Sun","Mon","Tues")), lang=c("en","en","en","pt","pt","pt","ko","ko","ko")) ggplot(data=df[df$lang=="en",])+ geom_point(aes(x=days,y=points),size=5,colour='cyan',show_guide=F)+ geom_point(aes(x=days,y=points,colour=days),size=4,show_guide=F)+ facet_wrap(~lang,ncol=1,scales="free")+ xlab("")+ ylab("")+ scale_y_continuous(labels = percent_format())+ theme(legend.position="right", legend.title = element_blank(), strip.text

Why does Firefox 4 absolutely position fieldset legends differently than other browsers?

好久不见. 提交于 2019-12-05 23:34:14
Why does Firefox 4 absolutely position fieldset legends differently than other browsers? Test page: <!DOCTYPE html> <html dir="ltr" lang="en"> <head> <meta charset="utf-8"/> <title>Test</title> <style type="text/css"> * { margin: 0; padding: 0; } body { font-family: Tahoma, Arial, sans-serif; font-size: 62.5%; } #wrapper { margin: auto; padding: 1em; width: 720px; } form { width: 670px; padding: 25px; background-color: #ffffff; /* White */ color: #000000; /* Black */ border: 1px solid #cccccc; /* Gray */ font-size: 12px; } fieldset { position: relative; border: 1px solid #cccccc; /* Gray */

Two adjacent symbols in matplotlib legend

牧云@^-^@ 提交于 2019-12-05 21:18:14
I would like to identify two different symbols (with different colors) on the same line in a legend. Below, I tried doing this with Proxy Artists, but the result is that they get stacked on top of each other in the legend. I want them next to each other or one above the other-- so they are both visible. from pylab import * import matplotlib.lines as mlines #define two colors, one for 'r' data, one for 'a' data rcolor=[69./255 , 115./255, 50.8/255 ] acolor=[202./255, 115./255, 50.8/255 ] #Plot theory: ax2.plot(rho, g_r, '-',color=rcolor,lw=2) ax2.plot(rho, g_a, '-',color=acolor,lw=2) #Plot

Matplotlib legend help

随声附和 提交于 2019-12-05 20:55:29
I am writing a script that plot's several points. I am also trying to create a legend from these points. To sum up my script, I am plotting several 'types' of points (call them 'a', 'b', 'c'). These points have different colors and shapes: 'a'-'go' 'b'-'rh' 'c'-'k^'. This is a shortened version of the relevant parts of my script: lbl = #the type of point x,y is (a,b,c) for x,y in coords: if lbl in LABELS: plot(x, y, color) else: LABELS.add(lbl) plot(x, y, color, label=lbl) legend() What I am doing here is just plotting a bunch of points and assigning a label to them. However, I found out if I

Fix legend title when using superscript in more than two lines - R ggplot2

喜你入骨 提交于 2019-12-05 19:43:29
I am plotting a map of my study area and I am having problems to edit the legend title. I need it to be "Projected fruit productivity in fallows in 40 yrs (fruits ha^-1) written in four lines. I could use bquote() to plot the -1 as a superscript. But it created an extra space that I cannot figure it out how to take it off. The extra space only appears when the title is divided into multiple lines. Also, expression(atop()) creates the superscript but once I tried to divide it into more than two lines it does not show lines three and four. This is the Map with the extra space using bquote() This