legend

Add legend to ggmap

南笙酒味 提交于 2019-12-11 18:07:17
问题 I am trying to add a legend to a plot generated by ggmap package in R. The dataset I am working with is Latitude Longitude amount 61.37072 -152.40442 436774 32.80667 -86.79113 3921030 34.96970 -92.37312 1115087 33.72976 -111.43122 5068957 The code I am using is library(ggplot2) library(ggmap) MyMap <- get_map(location = c(lon = -96.5, lat = 40.68925), zoom = 4,maptype = "terrain", scale = 2) ggmap(MyMap)+ geom_point(data = data,aes(x = Longitude , y = Latitude ),size=sqrt(data$amount)/800,col

how to add 3 legend for a single series barchart?? JAVAFX

无人久伴 提交于 2019-12-11 17:57:25
问题 Here is my code to generate 10 bars of different colors. I want to add legend respectively but it only shows yellow legend i can change its color but i want 3 legend. I think it shows only 1 color because there is only 1 series. Is it possible to add more than 1 legend for a single series? output: or if i can add this image as legend to the middle left of my chart i need how to display image in bar chart or how to create 3 different labels for a single series bar chart import javafx

broken legend and tooltip in zoomable sunburst chart (D3.js)

这一生的挚爱 提交于 2019-12-11 16:03:38
问题 I have a zoomable sunburst chart with the following issues: Legend is displaying vertically instead of horizontal. I thought that float:left on class legend would do the trick but labels display on new line instead. Allow users to disable categories in the legend to recalculate the sunburst chart. Tooltip is not showing up. What in the world am I missing? I want to append the grand total in the middle of the doughnut which dynamically changes upon zoom transitions. How does one go about that?

R 'ggplot2' Arranging common and unique legends with multiple (gridded) plot objects.

时间秒杀一切 提交于 2019-12-11 15:20:15
问题 edit - reproducible example included below I have been using this function with the ggplot2 package to Add a common Legend for combined ggplots which works perfecty when each plot has only 1 type of legend e.g. for ...,color =, ... . However, I am trying to arrange multiple plots which share a common legend but each has an additional unique legend e.g.: ggplot(df1, aes(x=Site, y=RESULT, color=Position , shape=DETNAME)) + geom_point(size=5) + ylab ("concentration (mg/L)") + labs (shape =

How to add a string as the artist in matplotlib legend?

你。 提交于 2019-12-11 14:02:21
问题 I am trying to create a legend in a python figure where the artist is a string (a single letter) which is then labelled. For example I would like a legend for the following figure: import numpy as np import matplotlib.pyplot as plt import string N = 7 x = np.random.rand(N) y = np.random.rand(N) colors = np.random.rand(N) area = np.pi * (15 * np.random.rand(N))**2 plt.scatter(x, y, s=area, c=colors, alpha=0.5) for i,j in enumerate(zip(x,y)): plt.annotate(list(string.ascii_uppercase)[i],xy=j)

Legend in D3 circle pack diagram

可紊 提交于 2019-12-11 13:55:34
问题 I need to create a legend for the bubble/circle pack chart. I'm displaying the values inside the circle. I need the names as the legend. For an instance, in the below provided data, if the value is 60, i need that name "Petrol" in the legend. How could i achieve it? Snippet: var diameter = 200, format = d3.format(",d"), color = ["#7b6888", "#ccc", "#aaa", "#6b486b"]; var bubble = d3.layout.pack().size([diameter, diameter]); var svg = d3.select("#bubbleCharts").append("svg") .attr("width",

Remove fieldset boarder and box-shadow from legend element

萝らか妹 提交于 2019-12-11 13:13:08
问题 I am trying to remove the background lines and shadows from the area where my legend is. Once I set the background to transparent in the legends property I can still see the lines. My code is as follows HTML: <fieldset> <legend>text goes here</legend> </fieldset> CSS: fieldset { margin:20px; padding:0 10px 10px; border:1px solid #666; border-radius:10px; box-shadow:0 0 10px #666; padding-top:10px; } legend { margin: 0px 5px; padding: 5px; white-space: nowrap; background: transparent ; font

How to enlarge legend symbols?

人盡茶涼 提交于 2019-12-11 13:09:40
问题 I am plotting my data as %% Plot relative wrt to GT for each frame XIndx_lsd = linspace(1,592, size( accu_RE_lsdSlam, 1 ) ); XIndx_my = linspace(1,592, size( accu_RE_my_method, 1 ) ); plot( XIndx_lsd, accu_RE_lsdSlam(:,5), 'r-.' ) hold on plot( XIndx_my, accu_RE_my_method(:,5), 'b-' ) AX=legend( 'rel translation error for Kerl et al.', 'rel translation error for D-EA' ); xhand = xlabel( 'Frame#' ); yhand = ylabel( '||trans(E_i)||_2 (in mm)' ); axis( [1 600 0 16] ); set(gca,'FontSize', 78);

Add a static/definite legend in D3JS graph

无人久伴 提交于 2019-12-11 12:43:16
问题 I have a D3JS scatter plot, whose data source is a MYSQL request. Basically data points are (x, y, category) and category can be (A,B,C,D,E). Sometimes, there is no point in MySQL Select request whose category is A, or B. BUT, I want all categories to be included in my legend, no matter if there is at least one point for each category represented in data source. Today, I have the following code for dots, where color is "harcoded" to ensure that Category "A" dots are ALWAYS in color #4a9b5b

D3.js grouped bar chart legend missing data

孤人 提交于 2019-12-11 12:02:46
问题 I have a grouped bar chart with an interactive legend. All seems to display and work ok but the legend is missing a value. I know that the issue is that the legend is going off the index of items on the x0 axis rather than the index of the bars (x1 axis). However i do not know how to resolve this. My data consists of the following: [{ "Group": 1, "DataPoints": [{ "BarValue": "Extension Cable", "Value": 1 }] }, { "Group": 2, "DataPoints": [{ "BarValue": "Extension Cable", "Value": 1 }, {