visualization

R: ggplot heatmap color change

亡梦爱人 提交于 2019-12-25 15:15:13
问题 df.team_data <- expand.grid(teams = c("Team A", "Team B", "Team C", "Team D") ,metrics = c("Metric 1", "Metric 2", "Metric 3", "Metric 4", "Metric 5") ) set.seed(41) df.team_data$performance <- sample(c(0, 1), 20, replace = TRUE) head(df.team_data) ggplot(data = df.team_data, aes(x = metrics, y = teams)) + geom_tile(aes(fill = performance)) I have a very simple heatmap with just two colors. How do I designate which colors are associated with the value of performance ? For this, I would like

R: ggplot heatmap color change

时光怂恿深爱的人放手 提交于 2019-12-25 15:12:51
问题 df.team_data <- expand.grid(teams = c("Team A", "Team B", "Team C", "Team D") ,metrics = c("Metric 1", "Metric 2", "Metric 3", "Metric 4", "Metric 5") ) set.seed(41) df.team_data$performance <- sample(c(0, 1), 20, replace = TRUE) head(df.team_data) ggplot(data = df.team_data, aes(x = metrics, y = teams)) + geom_tile(aes(fill = performance)) I have a very simple heatmap with just two colors. How do I designate which colors are associated with the value of performance ? For this, I would like

JSON => GoogleCharts formatting

强颜欢笑 提交于 2019-12-25 04:59:08
问题 I am desperately trying to get my GoogleChart working. This code always throws an error though: function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('number', 'hour'); data.addColumn('number', 'TriggerCount'); var JsonManuallyEncoded = '{1:{1:01,2:4},2:{1:03,2:4},3:{1:04,2:48},4:{1:05,2:59},5:{1:06,2:59},6:{1:07,2:87},7:{1:08,2:62},8:{1:09,2:46},9:{1:10,2:61},10:{1:11,2:71},11:{1:12,2:54},12:{1:13,2:61},13:{1:14,2:89},14:{1:15,2:58},15:{1:16,2:122},16:{1:17,2

google visualization timeline show time of mouse cursor

此生再无相见时 提交于 2019-12-25 00:43:14
问题 I hope that I can -in google visualization timeline- show time/date of mouse cursor in Java Script, Say like : console.log(googlechart.timedate(mouse.x)); is there any way to get the time date of my mouse x? the thing is that I am trying to do dragging for the timeline elements, so I first get the distance of the mouse got dragged when the cursor was on some element, now I got the pixels and I want to apply that changing in value of that timeline element that the dragging was over it,but can

Coffeescript jQCloud handlers

余生长醉 提交于 2019-12-24 22:32:02
问题 I'm trying to do this in coffeescript, http://jsfiddle.net/Q6348/8/ Specifically I'm trying to add handlers to my jQWordCloud to get the label for the word being clicked on In my coffeescript version while i < @counts.length x = @counts[i] @tag_list.push text: x.label weight: x.count handlers: click: -> temp = x -> alert "it worked for " + temp.label () ++i I get an unexpected TERMINATOR error presumably because of the (), but if you notice on the jsfiddle, removing that breaks the handler

Bivariate CDF/CCDF Distribution Python

橙三吉。 提交于 2019-12-24 14:46:30
问题 I am trying to plot a bivariate ccdf of the dataset that has x and y values both. Univariate I can plot very well, below is the input and the code is for univeriate dataset. Input: These are only first 20 rows of the data points. Input has 1000s of rows and of which col[1] and col[3] needs to be plotted as they posses a user and keyword frequency relationship. tweetcricscore 34 #afgvssco 51 tweetcricscore 23 #afgvszim 46 tweetcricscore 24 #banvsire 12 tweetcricscore 456 #banvsned 46

Map visualisation on Pentaho CE

对着背影说爱祢 提交于 2019-12-24 14:40:37
问题 I am running Pentaho ce 5.3, I already tested it with a star schema cube and it works fine. Now I would like to visualize into maps mdx queries on dimensions (including spatial ones) stored in Postgis. I don't know if it is possible, or should I add any plugin for this matter? 回答1: You have more options depending on what do you want to visualize. If you want to show: Map with markers: I recommand to use NewMapComponent . Documentation and example can be found in Pentaho > Browse Files >

Hosting a non-trivial python program on the web?

冷暖自知 提交于 2019-12-24 10:02:15
问题 I'm a complete novice in this area, so please excuse my ignorance. I have three questions: What's the best (fastest, easiest, headache-free) way of hosting a python program online? I'm currently looking at Google App Engine and Web Frameworks for Python, but all the options are a bit overwhelming. Which gui/viz libraries will transfer to a web app environment without problems? I'm willing to sacrifice some performance for the sake of simplicity. (Google App Engine can't do C libraries, so

Visualize arbitrary tree in Racket using tree-layout

喜夏-厌秋 提交于 2019-12-24 10:02:11
问题 How to visualise arbitrary tree? for example: (define T1 '(and (or x1 x2)(or x3 x4 x5))) or one generated with: (define functions '(not if and or)) (define terminals '(A0 A1 A2 D0 D1)) (define functions&terminals (append terminals functions )) (define (pick-one list) (list-ref list (random (length list)))) (define arities '((if . 3)(and . 2)(or . 2)(not . 1))) (define (terminal? symbol) (find (lambda (x)(eq? x symbol)) terminals)) (define (function? symbol) (find (lambda (x)(eq? x symbol))

Highcharts - when disabled in legend, line label still appears

大兔子大兔子 提交于 2019-12-24 08:37:55
问题 I am using highcharts and made this simple line chart. When I turn off the view for a person on the legend the name still appears as a line label on the line chart. Any way I can turn that off? I attached a picture of the problem. I want only Wilson to show. This is my code: Highcharts.chart('chart1', { chart: { type: 'line' }, title: { text: 'Hours vs Month (' + months[0] + "-" + months[5] + ")" }, xAxis: { categories: months }, yAxis: { title: { text: 'Hours' } }, tooltip: { valueSuffix: '