visualization

R: changing color of stacked barplot

孤者浪人 提交于 2020-01-13 05:17:23
问题 library(ggplot2) df2 <- data.frame(supp=rep(c("VC", "OJ"), each=3), dose=rep(c("D0.5", "D1", "D2"),2), len=c(6.8, 15, 33, 4.2, 10, 29.5)) head(df2) ggplot(data=df2, aes(x=dose, y=len, fill=supp)) + geom_bar(stat="identity") I have a simple stacked barplot, and I would like to change the colors manually. More specifically, I would like to flip the colors used for fill = supp (i.e. teal for OJ instead). I've trid adding a color = ... parameter into geom_bar but that simply outlines the barplots

Tool for discovering dependencies of .NET code (not VS2010)

十年热恋 提交于 2020-01-12 23:15:09
问题 Given a really big .NET codebase. Some parts in sources and some parts in binaries. It's all .NET code. I'd like to have a tool for discovering dependencies in that code base. By assemblies and by types. Having visualisation of dependencies in graphic form would be very nice. I'd like to have: instantiation graph, refenrece graph, call graph, type dependencies graph. For an instance take a class and get all kind of dependencies from his point of view on a diagram with ability to filter by

What are good libraries for creating a python program for (visually appealing) 3D physics simulations/visualizations?

时光总嘲笑我的痴心妄想 提交于 2020-01-12 05:37:05
问题 What are good libraries for creating a python program for (visually appealing) 3D physics simulations/visualizations? I've looked at Vpython but the simulations I have seen look ugly, I want them to be visually appealing. It also looks like an old library. For 3D programming I've seen suggestions of using Panda3D and python-ogre but I'm not sure if it is really suited for exact simulations. Also, I would prefer a library that combines well with other libraries (E.g. pygame does not combine so

SVG: adding shadow filter makes straight line invisible [duplicate]

点点圈 提交于 2020-01-11 09:05:57
问题 This question already has answers here : Adding feDropShadow to a vertical line in SVG makes it disappear (2 answers) Closed 2 years ago . I'm trying to add a shadow to my SVG. It works well with all 2D objects, but when same filter is applied to a straight line (either <line> or <path> ), the line becomes invisible, and no shadow is added. Demo: https://jsfiddle.net/ccj0Ldfh/1/ 回答1: Per the last paragraph here Keyword objectBoundingBox should not be used when the geometry of the applicable

Can i use d3.js for creating interactive visualizations inside an android app?

别等时光非礼了梦想. 提交于 2020-01-10 07:41:54
问题 I am trying to create an interactive visualization within an android app. The data that will be visualized will be stored locally in a sqlite database and will be queried to generate visualizations. I have not yet decided whether to build a native app or a web app. Based on my research d3.js seems to fit the needs very well but I am unsure about how to use it in a mobile environment. 回答1: You can easily embed Javascript into an Android app using the WebView component or you can use PhoneGap

R ggplot2 aes argument

只愿长相守 提交于 2020-01-10 05:12:05
问题 I have a function: vis = function(df, x){ p1 <- ggplot(df, aes(x)) + geom_line(aes(y = v2)) p1 } I have a data frame: df = data.frame(v0 = c(1,2,3), v1 = c(2,3,4), v2 = c(3,4,5)) I want to generate plot: (1) v2 v.s. v0, (2) v2 v.s. v1. So I tried: vis(df, v0) // not work vis(df, v1) // not work vis(df, "v0") // not work vis(df, "v1") // not work Much appreciated any idea! 回答1: If we are passing an unquoted string, then convert it to quosure and then evaluate ( !! ) library(rlang) library

Matplotlib imshow/matshow display values on plot

為{幸葍}努か 提交于 2020-01-09 13:05:31
问题 I am trying to create a 10x10 grid using either imshow or matshow in Matplotlib. The function below takes a numpy array as input, and plots the grid. However, I'd like to have values from the array also displayed inside the cells defined by the grid. So far I could not find a proper way to do it. I can use plt.text to place things over the grid, but this requires coordinates of each cell, totally inconvenient. Is there a better way to do what I am trying to accomplish? Thanks! NOTE: The code

How to perform an onclick action on button click in python bokeh?

大城市里の小女人 提交于 2020-01-06 07:27:59
问题 I'm new to bokeh and I have aquery regarding button onclick event, the code is provided below: x = widgetbox(button) show(x) fruits = ['Answered', 'Unanswered','Total'] top1=[1,2,3] def callback(): p = figure(x_range=fruits, plot_height=250, title="sophia bot") p.vbar(x=fruits, top=top1, width=0.9) p.xgrid.grid_line_color = None p.y_range.start = 0 output_file("abc.html") show(p) button_one = Button(label="Start", disabled=True, callback=callback) show(button_one) but this isnt performing the

Embeddable customizable graph editor (Java, Flash, HTML+Javascript)

大兔子大兔子 提交于 2020-01-06 05:48:11
问题 I have an application that uses intricate graph-like structure as a configuration. The application itself resembles a NetGraph- or netfilter firewall, thus graph nodes have types and properties (which correspond to operations) and they're interconnected with directed edges. I'd like to have an easy-to-user configuration editor for my application that provides visualization and editing for configuration as a graph. In my dream scenario, application would receive this configuration as a file in

Error “ Index exceeds Matrix dimensions”

坚强是说给别人听的谎言 提交于 2020-01-05 08:18:32
问题 I am trying to read an excel 2003 file which consist of 62 columns and 2000 rows and then draw 2d dendrogram from 2000 pattern of 2 categories of a data as my plot in matlab. When I run the script, it gives me the above error. I don't know why. Anybody has any idea why I have the above error? My data is here: http://rapidshare.com/files/383549074/data.xls Please delete the 2001 column if you want to use the data for testing. and my code is here: % Script file: cluster_2d_data.m d=2000; n1=22;