visualization

Measure “ink” of a plot

情到浓时终转凉″ 提交于 2019-12-23 09:04:53
问题 I am reading on Tufte's data-ink ratio and I was wondering if it is possible to measure the amount of "ink" a plot uses? If not possible in R perhaps with another tool such as GIMP or imagemagick? 回答1: I'd suggest using grid.cap() to convert the contents of the graphics device to a raster, after which it's a simple matter to compute the proportion of non-white pixels (aka "ink"). In the following example, to focus the computations on ink in the plotting area, I've set par(mar=c(0,0,0,0)) ,

how to get fully dark kibana?

走远了吗. 提交于 2019-12-23 07:58:00
问题 I'm starting with kibana and I see a lot of pictures where kibana has different visual than on official web site. I like it more but I can't find how to switch on it. You may think that I'm talking bout black dashboard theme but it's not exactly what I'm looking for. On pictures I saw kibana seems to be fully dark and even have different layout. Let me show Hope now it's understandable what I mean. If so, can someone help me and tell how can I get this fully dark kibana ? or tell me where I'm

Creating an asinh (inverse hyperbolic sine) scale in d3.js v4

两盒软妹~` 提交于 2019-12-23 07:26:37
问题 This would be a replacement for a log scale so that it can deal with negative numbers. Haven't seen many examples of custom scales though I've been trying to use d3's logarithmic scale's source as a starting point. 回答1: As far as I know there are no ways to make custom scales in D3 (at least not in the sense you are looking for). All D3 scales scale in two steps: using the domain, deinterpolate the input given a deinterpolation function using the range, interpolate the intermediate result

Sankey diagrams in Python

女生的网名这么多〃 提交于 2019-12-23 07:08:52
问题 Is there a Python library for generating Sankey diagrams? I've seen this list of Sankey diagram applications and libraries, but none of them is in Python. 回答1: Apparently matplotlib 1.1 can now do this. Code and sample output is here. Below is a screenshot demonstrating what it can do. 回答2: I did a Google search on "Python graph visualization" and found some stuff. There are several libraries that have "spring" behavior where the software balances out a graph and makes it pretty; they do much

Sankey diagrams in Python

蓝咒 提交于 2019-12-23 07:08:08
问题 Is there a Python library for generating Sankey diagrams? I've seen this list of Sankey diagram applications and libraries, but none of them is in Python. 回答1: Apparently matplotlib 1.1 can now do this. Code and sample output is here. Below is a screenshot demonstrating what it can do. 回答2: I did a Google search on "Python graph visualization" and found some stuff. There are several libraries that have "spring" behavior where the software balances out a graph and makes it pretty; they do much

Rotate y-axis label in scatterplot3d (adjust to angle of axis)

风格不统一 提交于 2019-12-23 05:04:55
问题 I use scatterplot3d to plot 3D with R. The orientation of the y-axis label bothers me because it is vertical and not parallel to the y-axis. Is there a way to rotate the label and adjust its angle? Unfortunately, I didn't finde anything in the documentation. 回答1: If you don't have to draw many plots and are willing to adjust values manually, you can pass ylab = "" when making the 3d scatter and then add text later on with appropriate srt value. srt allows you to rotate text at desired angle.

How to have scatter points become larger for higher density using matplotlib?

那年仲夏 提交于 2019-12-23 05:03:48
问题 I am using matplotlib to draw a plot. The x and y axises are discrete values and therefore, several (x,y) points in the list have the same values. For example, assume we have the following x,y points: x=[0,1,1,2,2,2,2,2] y=[0,1,2,3,3,3,3,5] Now all of the (x,y) points occur once, but (2,3) occurs 4 times. When I use plt.scatter(x,y) , it only shows (2,3) as a regular point, once. How is it possible to show the density of occurrence, too? For example, a bigger marker? 回答1: You can pass an

How to have scatter points become larger for higher density using matplotlib?

余生颓废 提交于 2019-12-23 05:03:45
问题 I am using matplotlib to draw a plot. The x and y axises are discrete values and therefore, several (x,y) points in the list have the same values. For example, assume we have the following x,y points: x=[0,1,1,2,2,2,2,2] y=[0,1,2,3,3,3,3,5] Now all of the (x,y) points occur once, but (2,3) occurs 4 times. When I use plt.scatter(x,y) , it only shows (2,3) as a regular point, once. How is it possible to show the density of occurrence, too? For example, a bigger marker? 回答1: You can pass an

How can i add a GLSL Fragment Shader Audio Visualization

微笑、不失礼 提交于 2019-12-23 04:33:18
问题 How can i add Audio Visualization support to this class, i would like to add an Audio() object as an input to a GLSL Fragment Shader. An Example of this is https://www.shadertoy.com/view/Mlj3WV. I know this sort of thing can be done in Canvas 2d with waveform Analysis, but this opengl method is far more smooth. /* Code from https://raw.githubusercontent.com/webciter/GLSLFragmentShader/1.0.0/GLSLFragmentShader.js */ /* render function */ /* set the uniform variables for the shader */ gl

How to get common child node in D3.js Force-based Labeled Layout Graph

坚强是说给别人听的谎言 提交于 2019-12-23 04:26:25
问题 I am working on web crawler visualization using D3 that uses a forced-based labeled graph like the one shown here: Force-based label placement graph I am unable to get two parent nodes to have the same common child. Is this not possible using this graph? Because the example case shows such a scenario where two nodes share the same child. How do I do this? I am using the following script on my webpage to populate and show the graph (The array being shown in the script is just a dummy array I