legend

How to show legend tooltip when hover on legend series in ApexCharts.js

 ̄綄美尐妖づ 提交于 2020-08-05 10:11:50
问题 Currently there is no such feature in apexchart v3.19.3, does anyone have a work around for this? 回答1: I end up created a custom legend tooltip to be shown when hovered on legend series. below are the steps for this solution: create a function to append legend tooltip html and css into to the chart's legend series container. set this function to be called in these two apexcharts events: charts.events.updated() and charts.events.mounted() , this is to ensure the legend tooltip template is

No handles with labels found to put in legend

走远了吗. 提交于 2020-08-04 06:32:40
问题 I'm trying to create a parallelogram in PyPlot. I'm not up to drawing the parallelogram--first I'm putting in the vector arrows--using the following code: fig = plt.figure() ax = fig.add_subplot(111) ax.spines['left'].set_position('zero') ax.spines['right'].set_color('none') ax.spines['bottom'].set_position('zero') ax.spines['top'].set_color('none') plt.axis([-5,5,-5,5]) ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left') plt.grid() plt.arrow(0,0, 3,1, head_width=0.2,

How to make discrete gradient color bar with geom_contour_filled?

[亡魂溺海] 提交于 2020-07-27 23:21:23
问题 I plot a map based on a piece of code like this: ggplot(faithfuld, aes(y=eruptions, x=waiting, z=100*density)) + geom_contour_filled(breaks = c(-Inf,-2., -1.5, -1., -0.5, 0, 0.5, 1, 1.5, 2, 3, 4, 5, 7, 9, 11,Inf))+ theme(plot.title = element_text(size = 10,hjust = 0.5)) This is my plot currently looks like: But my boss asks me to make the legend like this: or like this: Arguments from this link (https://ggplot2.tidyverse.org/reference/theme.html) just provide minor changes for the legend. And

Adding trend lines across groups and setting tick labels in a grouped violin plot or box plot

旧时模样 提交于 2020-07-23 07:39:08
问题 I have xy grouped data that I'm plotting using R 's ggplot2 geom_violin adding regression trend lines: Here are the data: library(dplyr) library(plotly) library(ggplot2) set.seed(1) df <- data.frame(value = c(rnorm(500,8,1),rnorm(600,6,1.5),rnorm(400,4,0.5),rnorm(500,2,2),rnorm(400,4,1),rnorm(600,7,0.5),rnorm(500,3,1),rnorm(500,3,1),rnorm(500,3,1)), age = c(rep("d3",500),rep("d8",600),rep("d24",400),rep("d3",500),rep("d8",400),rep("d24",600),rep("d3",500),rep("d8",500),rep("d24",500)), group

Adding trend lines across groups and setting tick labels in a grouped violin plot or box plot

﹥>﹥吖頭↗ 提交于 2020-07-23 07:38:08
问题 I have xy grouped data that I'm plotting using R 's ggplot2 geom_violin adding regression trend lines: Here are the data: library(dplyr) library(plotly) library(ggplot2) set.seed(1) df <- data.frame(value = c(rnorm(500,8,1),rnorm(600,6,1.5),rnorm(400,4,0.5),rnorm(500,2,2),rnorm(400,4,1),rnorm(600,7,0.5),rnorm(500,3,1),rnorm(500,3,1),rnorm(500,3,1)), age = c(rep("d3",500),rep("d8",600),rep("d24",400),rep("d3",500),rep("d8",400),rep("d24",600),rep("d3",500),rep("d8",500),rep("d24",500)), group

Adding trend lines across groups and setting tick labels in a grouped violin plot or box plot

我是研究僧i 提交于 2020-07-23 07:37:29
问题 I have xy grouped data that I'm plotting using R 's ggplot2 geom_violin adding regression trend lines: Here are the data: library(dplyr) library(plotly) library(ggplot2) set.seed(1) df <- data.frame(value = c(rnorm(500,8,1),rnorm(600,6,1.5),rnorm(400,4,0.5),rnorm(500,2,2),rnorm(400,4,1),rnorm(600,7,0.5),rnorm(500,3,1),rnorm(500,3,1),rnorm(500,3,1)), age = c(rep("d3",500),rep("d8",600),rep("d24",400),rep("d3",500),rep("d8",400),rep("d24",600),rep("d3",500),rep("d8",500),rep("d24",500)), group

Errors Using `d3.legend`: Uncaught TypeError: node.getAttribute is not a function

无人久伴 提交于 2020-07-10 08:16:44
问题 I am trying to add a D3 legend to my donut chart, and I followed the example here: http://bl.ocks.org/ZJONSSON/3918369. The donut chart renders fine. However, I am running into below errors: Inside the d3.legend() function, I am getting this error 'Uncaught TypeError: node.getAttribute is not a function' and 'Uncaught TypeError: this.querySelectorAll is not a function'. I am not sure why...any thoughts? // Alerts.js renderBody() { const {list, currentProgram} = this.props const width = 260;

How can I automatically wrap the charts_flutter legends?

旧街凉风 提交于 2020-07-10 03:22:27
问题 How can I automatically wrap the charts_flutter legends? Current state: Expected: I tried, behaviors: [charts.SeriesLegend(desiredMaxColumns: 2)], But, it has been fixed to two columns. The number of lines and the legend length are variable. What should I do? 回答1: This isn't an out-of-the-box solution but you can create your own custom legend builder and layout your legend however you see fit by extending the charts.LegendContentBuilder class. class CustomLegendBuilder extends charts

How can I automatically wrap the charts_flutter legends?

心不动则不痛 提交于 2020-07-10 03:22:04
问题 How can I automatically wrap the charts_flutter legends? Current state: Expected: I tried, behaviors: [charts.SeriesLegend(desiredMaxColumns: 2)], But, it has been fixed to two columns. The number of lines and the legend length are variable. What should I do? 回答1: This isn't an out-of-the-box solution but you can create your own custom legend builder and layout your legend however you see fit by extending the charts.LegendContentBuilder class. class CustomLegendBuilder extends charts

How to set legend marker size and alpha?

假装没事ソ 提交于 2020-07-08 09:25:11
问题 I have a seaborn scatter plot ( lmplot ) with over 10K points. In order to perceive all the data, it works better when the plot size is larger (making the markers relatively small) and the alpha on the markers is low. However, this makes the markers on the legend difficult to distinguish. How does one set the marker size and marker alpha in Seaborn? I see that g._legend has a markersize attribute, but directly setting it doesn't do anything. Example import numpy as np import pandas as pd