data-visualization

Setting x.domain with setInterval

不打扰是莪最后的温柔 提交于 2019-12-06 14:47:48
问题 modify this question again, because the solution does not work in the new version of the library d3 (3.0.3), so I come to ask for some help again would be very grateful. Here is the new code with the library d3 (3.0.3): https://gist.github.com/4495104 http://bl.ocks.org/4495104/e7a7589098140dff36df7ab2a824d71072bc3be4 According to what I've worked, the error should be in the line "491". // Reset the domain relative to the current zoom offsets. x.domain(x0.range().map(function(x) { return (x -

How can I produce visualizations combining network graphs and imaginary maps?

落花浮王杯 提交于 2019-12-06 14:14:08
问题 Basically, I'm looking for something like this awesome research project: Gmap, which was referenced in this related SO question. It's a rather novel data visualization that combines a network graph with an imaginary set of regions that looks like a map. Basically, the map-ification helps humans comprehend the enormous data set better. Cool, huh? GMap doesn't appear to be open source, though I plan to contact the authors. I already know how to create a network graph with a force-directed

How to make a heatmap of 3 discrete values using ggplot2?

北城以北 提交于 2019-12-06 13:32:28
问题 I have a problem with the aes parameters; not sure what it's trying to tell me to fix. My data frame is like so: > qualityScores Test1 Test2 Test3 Test4 Test5 Sample1 1 2 2 3 1 Sample2 1 2 2 3 2 Sample3 1 2 1 1 3 Sample4 1 1 3 1 1 Sample5 1 3 1 1 2 Where 1 stands for PASS, 2 for WARN, and 3 for FAIL. Here's the dput of my data: structure(list(Test1 = c(1L, 1L, 1L, 1L, 1L), Test2 = c(2L, 2L, 2L, 1L, 3L), Test3 = c(2L, 2L, 1L, 3L, 1L), Test4 = c(3L, 3L, 1L, 1L, 1L), Test5 = c(1L, 2L, 3L, 1L, 2L

How to do aligned scrolling through two chart areas without using AlignToChartArea?

醉酒当歌 提交于 2019-12-06 12:43:33
I have two ChartArea objects in a Chart ( System.Windows.Forms.DataVisualization.Charting is what I'm using). One is a Point graph, and the other is a RangeBar graph. The horizontal axis on the RangeBar graph is actually the Y axis, so I cannot just use something like this: Chart1.ChartAreas["Chart Area 2"].AlignWithChartArea = "Default"; I've figured out how to zoom both charts and keep them aligned, but when I try to scroll both charts by clicking on the scrollbar on one of the horizontal axes, I can't quite get it to line up. They almost line up, but they're off by maybe a second or so (the

Multiple boxplots for multiple conditions in R

大城市里の小女人 提交于 2019-12-06 12:40:15
问题 I understood how I have to plot multiple boxplots in one graph from the several others posts. But I have this situation where am unable to plot multiple conditions together. I applied the same idea as my former post (Multiple boxplots in R) but does not work for this case. I have this dataset Control Treatment L1 L2 L3 L4 L5 S1 S2 S3 S4 S5 g1 10.5 12 10 11 12 13 14 10 11 12 g2 11 13 10 10 11 10.5 12 8 9 10 g3 10 9 9 8 9 11 10 11 9 11 g4 9 8 8 9 8 6 5 5 7 6 g5 16 4 6.5 6.8 5 4 6 6 8 9 g6 11 12

Bokeh nested column layout

送分小仙女□ 提交于 2019-12-06 11:53:16
问题 I want to create a nested layout in bokeh with 2 columns. The left column has 2 plots, one above the other. The right column has a number of widgets, all stacked ontop of each other. I also want everything to autofit within the browser window: I currently have something like this: from bokeh.io import curdoc from bokeh.layouts import row, column, widgetbox, layout from bokeh.models import ColumnDataSource from bokeh.models.widgets import Slider, TextInput, Button, CheckboxGroup,

Partial shade of distribution plot using Seaborn

家住魔仙堡 提交于 2019-12-06 11:33:44
问题 Following simple code: import numpy as np import seaborn as sns dist = np.random.normal(loc=0, scale=1, size=1000) ax = sns.kdeplot(dist, shade=True); Yields the following image: I would like to only shade everything right (or left to some x value). What is the simplest way? I am ready to use something other than Seaborn. 回答1: After calling ax = sns.kdeplot(dist, shade=True) , the last line in ax.get_lines() corresponds to the kde density curve: ax = sns.kdeplot(dist, shade=True) line = ax

Python Plotly - Multiple dropdown plots, each of which have subplots

╄→尐↘猪︶ㄣ 提交于 2019-12-06 11:28:05
Problem I'm trying to combine two Python Plotly features. One of them is a drop down menu where a user can switch between plots ( link to examples ). The other feature is subplots. My attempt I have working code that uses the dropdown menu, but it doesn't have subplots. So I looked up how to create subplots here and I thought I could treat a tools.make_subplots figure the same way I treated a go.Box figure. I'm sorry if this seems naive, I'm actually fairly new to Plotly. However, this attempt is not working at all, I'm seeing two exceptions rise which I've put at the very bottom. My Working

Dot Plot in D3.js

倖福魔咒の 提交于 2019-12-06 08:07:36
问题 I'm interested in creating a Dot plot (the one with the consecutive dots for every data value) but what I've managed so far is to create just a single dot for every value. To be more clear, let's say for the array1 I want for the first value to create 5 circles, for the second 4 circles and so on... array1 = [5,4,2,0,3] Any ideas? Part of my code: var circle = chart.selectAll("g") .data(d) .enter() .append("g") .attr("transform", function(d) { return "translate(" + xScale(d.values) + ",0)"; }

Pygal Maps World Not Working

耗尽温柔 提交于 2019-12-06 07:58:30
问题 I am trying to create a simple program so as to display the map of central America with their population using Pygal_maps_world.Here's the code for the same import pygal_maps_world as pa wm=pa.World() wm.title="Map of Central America" wm.add('North America',{'cd': 84949494949,'mx': 494794164,'us': 99794616}) wm.render_to_file('map.svg') I have tried a few combinations regarding the importing of the World maps to work properly but to no avail and i am not able to create the visualization. Help