data-visualization

How to create a grouped bar chart in Altair?

橙三吉。 提交于 2019-12-06 01:43:12
问题 How does one create a grouped bar chart in Altair? I'm trying the following but it is just producing two graphs side by side. Chart(data).mark_bar().encode( column='Gender', x='Genre', y='Rating', color='Gender' ) 回答1: Example of group bar chart I show a simplified example of Grouped Bar Chart from Altair's documentation. You can also see the full documentation here. Basically, you have to specify x-axis Gender (F or M in each subplot), y-axis as Rating and Genre as Column . from altair

Can we add event listeners to “Vega-Lite” specification?

我与影子孤独终老i 提交于 2019-12-06 00:56:29
I am new to Vega and Vega-Lite. I am creating a simple bar chart using Vega-Lite but I am not able to add any event listeners e.g. "hover". I want to hover a bar and change the color of the bar. If you're using Vega-Embed , it returns a promise with a reference to the view which allows you to use addEventListener - explained in the docs here . Here is an example: const width = 600 const color = blue embed(element, { $schema: 'https://vega.github.io/schema/vega-lite/3.0.0-rc6.json', data: { 'values': data }, mark: { type: 'line', color, point: { color, } }, width, height: width / 2, encoding: {

Highcharts: is it possible to show all data labels in a bubble chart without them overlapping?

守給你的承諾、 提交于 2019-12-06 00:04:51
I'm building a Highcharts bubble chart and am running into a challenge formatting the data labels. The data will be regularly updated, so there will be plenty of times when the bubbles either overlap or are very close to each other. By default, labels that are very close to one another will be omitted. However, my requirements for this chart include showing the data labels for all bubbles, regardless of their position (therefore, I'm setting allowOverlap to true ). Here is a variation of the demo bubble chart that shows my issue (see also the screenshot below): http://jsfiddle.net/brightmatrix

What is a good visualization library for creating state diagrams and animations?

吃可爱长大的小学妹 提交于 2019-12-05 22:13:07
I'd like to post-process log files and extract node data and transitions, and then graph them in a gui of some kind. So, I'd like to programmaticly draw bubble diagrams, maybe with animations showing packets going from node to node. Ideally, perl or java would be the language of choice, but anything that runs on a linux platform would be fine. What is the best library for this kind of thing? Java Solutions Two possibilities in Java include Prefuse and Visual Library . They both have the ability to display graphs with some animation ability. Prefuse has better graph layouts. Visual Library is

Multiple node selection in vis.js

旧城冷巷雨未停 提交于 2019-12-05 20:38:29
I'm playing with vis.js because I like its Network Visualization module. I'd like to know, as I can't find it in documentation, if it's possibile to select multiple nodes. Cheers, Riccardo Scott Search for "selectable" property in documentation at http://visjs.org/docs/network/ If true, nodes in the network can be selected by clicking them. Long press can be used to select multiple nodes. Update! the link for the documentation is http://visjs.org/docs/network/interaction.html set the multiselect property to true. add this section to your network option object. interaction: { multiselect: true}

Highcharter deprecated function's output is different than suggested

一曲冷凌霜 提交于 2019-12-05 19:52:27
I am producing a time series plot with Josh Kunst's excellent highcharter library in R. Using this data: > dput(t) structure(c(2, 2, 267822980, 325286564, 66697091, 239352431, 94380295, 1, 126621669, 158555699, 32951026, 23, 108000151, 132505189, 29587564, 120381505, 25106680, 117506099, 22868767, 115940080, 22878163, 119286731, 22881061), .Dim = c(23L, 1L), index = structure(c(1490990400, 1490994000, 1490997600, 1491001200, 1491004800, 1491008400, 1491012000, 1491026400, 1491033600, 1491037200, 1491040800, 1491058800, 1491062400, 1491066000, 1491069600, 1491073200, 1491076800, 1491109200,

how to remove line from fill scale legend using geom_vline and geom_histogram r ggplot2

柔情痞子 提交于 2019-12-05 19:39:38
Basics: Using R statistical software, ggplot2, geom_vline, and geom_histogram to visualize some data. The issue is with the legend keys. I'm trying to plot a pair of histograms from some stochastic simulations, and on top of that plot a couple of lines representing the result of a deterministic simulation. I've got the data plotted, but the legend keys for the histograms have an unnecessary black line through the middle of them. Can you help me remove those black lines? Some sample code reproducing the issue is here: df1 <- data.frame(cond = factor( rep(c("A","B"), each=200) ), rating = c

Relationship Graph with D3

梦想的初衷 提交于 2019-12-05 18:40:59
How would I create the following graph with D3? I don't know the name for this type of visualization, and the closest I could find were "force-directed" graphs. Legend: Filled nodes are people, non-filled nodes are attributes (e.g. favorite color). This is my version: http://jsfiddle.net/doraeimo/JEcdS/embedded/result/ which is easy to show system performance and network flow. code is not here Hacked together a gross but working version: http://bl.ocks.org/hijonathan/5793014 Basically, I started with an array of people nodes that had some properties on them. I then loop through that and

Contour plot from scattered data in JavaScript [closed]

﹥>﹥吖頭↗ 提交于 2019-12-05 18:25:50
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm trying to plot a 2D and 3D contour from x, y, z data. Does anyone know any good JavaScript library that does that? Thank you jluckin This question is very similar to another question that was already asked and answered at Create contour map In that post, it was recommended to use d3.js and conrec.js. 来源: https://stackoverflow.com/questions/24127518/contour-plot-from-scattered-data-in-javascript

Updating D3 circle pack layout

房东的猫 提交于 2019-12-05 16:07:39
I'm trying to dynamically update a d3 circle pack layout with data I receive in json. Every second I call d3.json() to get the new json. Instead of updating the existing visualization, my implementation just creates a new one under the old one. I want to to dynamically update the existing layout instead... <!DOCTYPE html> <html> <head> <script type="text/javascript" src="d3.v2.js"> </script> <script type="text/javascript" src="jquery-1.4.min.js"></script> <link rel="stylesheet" href="style.css" type="text/css"> <link rel="stylesheet" href="syntax.css" type="text/css"> <link rel="stylesheet"