legend

powershell cannot add more than one legend entry (series) to an excel chart

a 夏天 提交于 2019-12-23 17:53:22
问题 I have a problem adding more than one series to the seriescollection in excels chart object through powershell here is my code: [threading.thread]::CurrentThread.CurrentCulture = 'en-US' $excel = New-Object -comobject Excel.Application $workbook = $excel.workbooks.add() $datasheet = $workbook.Worksheets.Item(2) $chartsheet = $workbook.Worksheets.Item(1) [datetime] $startDate = "2012-11-29 00:00:00" [datetime] $finishDate = "2012-12-07 00:00:00" [datetime] $dayCounter = $startDate $startRow =

Legend showing an unexpected black line with geom_vline

纵然是瞬间 提交于 2019-12-23 12:51:41
问题 I have been trying to add an additional legend after looking at some of the answers provided at StackOverflow but somehow I can't make this work. I'm using the following code: x_breaks <- seq(as.Date("2010/1/1"), as.Date("2015/4/1"), "months") x_labels <- as.character(x_breaks, format="%b%y") vLines <- data.frame('Date'=as.Date('2014/1/1')) vLines <- rbind(vLines,vLines,vLines,vLines) vLines$Date[1] <- as.Date('2010/6/7') vLines$Date[2] <- as.Date('2012/1/1') vLines$Date[3] <- as.Date('2012

Split marker and line in Legend - Matplotlib

ぃ、小莉子 提交于 2019-12-23 11:10:11
问题 I want to make a legend where I specify the value for the markers and the value for the lines but not the combination of both. This example should help to illustrate my goal: import matplotlib.pyplot as plt import numpy as np pi=3.14 xx=np.linspace(0,2*pi,100) fig = plt.figure() ax = fig.add_subplot(111) phases=[0,pi/4,pi/2] markers=['s','o','^'] for phase,mk in zip(phases,markers): labeltext='Sine' + '*' + str(phase) F=[np.sin(x+phase) for x in xx] ax.plot(xx,F,color='b',marker=mk,label

Make a legend fill up the full width within the fieldset

和自甴很熟 提交于 2019-12-23 09:48:45
问题 I would like to have a background for a legend field within a fieldset . And I want it to take up the full width, but only within the fieldset. If I use legend {width: 100%} it will be wider than the fieldset . Here is an example, runnable in JSFiddle: <html> <head> <style> fieldset { border:0; outline: 1px solid gray; } legend { font-weight:bold; background: orange; width: 100% } </style> </head> <body> <fieldset> <legend>Legend</legend> Content of Fieldset </fieldset> </body> </html> Is

Flot pie chart change position of legends

喜夏-厌秋 提交于 2019-12-23 07:42:47
问题 Can we change the position of legends from default left side to right or bottom? How can we implement hover on mouse pointer that is the content should be shown on the mouse pointer and not in other DIV 回答1: The legend option takes a "position" attribute to specify it's location: legend: { position: "ne" or "nw" or "se" or "sw" } What do you mean by "on the mouse pointer". Would you like the "content" to follow the pointer? 回答2: Here's the documentation of the library you're using: https:/

Adding color and bubble size legend in R plotly

不问归期 提交于 2019-12-23 05:59:15
问题 Probably an easy one. I have an xy dataset I'd like to plot using R 's plotly . Here are the data: set.seed(1) df <- data.frame(x=1:10,y=runif(10,1,10),group=c(rep("A",9),"B"),group.size=as.integer(runif(10,1,10))) I'd like to color the data by df$group and have the size of the points follow df$group.size (i.e., a bubble plot). In addition, I'd like to have both legends added. This is my naive attempt: require(plotly) require(dplyr) main.plot <- plot_ly(type='scatter',mode="markers",color=~df

create legend manually in matplotlib

笑着哭i 提交于 2019-12-23 05:15:14
问题 I have the following code to plot a bar graph - there are 6 species but the code groups them into three coloured groupings. I then want to make a legend of the three groups with three colours. However, the legend only features the first grouping (which is colored correctly!) and then ignores the other groupings (see image) import pandas as pd import matplotlib.pyplot as plt import numpy as np #create data frame G = pd.DataFrame(np.random.normal(100,20,size=(30, 1)), columns=list('G')) T = []

R - Legend For Specific Points in ggplot

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 04:42:19
问题 Unfortunately, I think this is a tough item to reproduce, but I think the question should be simple enough to answer with a visual... I'd like to build a legend for three specific dimensions in geom_point. Any Hockey Fans Out There? I'd like to build a legend for the dimensions that have colors on this chart. They are three different players I'd like to highlight, the rest of the points on the plot being general noise, but necessary for a visual. In my opinion, here a legend would be more

No legend shows up using multiple geom_point and geom_line functions in 1 graph

半世苍凉 提交于 2019-12-23 03:53:10
问题 I'm struggling to learn the ins and outs of R, ggplot2, etc - being more used to being taught in an A to Z manner an entire (fixed) coding language (not used to open source - I learned to code when dinosaurs roamed the earth). So I have kluged together the following code to create one graph. Only ... I don't have the dupe legends problem -- I have no legend a'tall! erc <- ggplot(usedcarval, aes(x = usedcarval$age)) + geom_line(aes(y = usedcarval$dealer), colour = "orange", size = .5) + geom

Only display specific labels of a ggplot legend

做~自己de王妃 提交于 2019-12-23 03:28:08
问题 I have some data points, and I want to single out some of the points in my visualization. I would do it like this: df = data.frame( x = 1:4, y = 1:4, special = c('normal', 'normal', 'normal', 'special') ) ggplot(df) + geom_point(aes(x, y, color = special)) + scale_color_manual(values = c('red', 'black')) + labs(color = "") + theme_bw() My issue here is that the black points are very self explanatory and don't need a label. I want just the red "special" label to appear. Is there a way I can