data-visualization

Logarithmic y-axis Tick Marks in R plot() or ggplot2()

为君一笑 提交于 2019-12-03 08:19:51
问题 I saw the ideal tick-mark structure for a log="y" plot in this paper, Figure 3b 3c 3d. It has short, log-spaced minor tick marks without labels, plus long, log-spaced major tick marks with labels. Does anyone know how to achieve this in R ? 回答1: In base R just build the axes however you want. Something like this could be a start. set.seed(5) d <- data.frame(x=1:100, y=rlnorm(100, meanlog=5, sdlog=3)) with(d, { plot(x, y, log="y", yaxt="n") y1 <- floor(log10(range(y))) pow <- seq(y1[1], y1[2]

Matplotlib : quiver and imshow superimposed, how can I set two colorbars?

依然范特西╮ 提交于 2019-12-03 07:38:16
问题 I have a figure that consists of an image displayed by imshow() , a contour and a vector field set by quiver() . I have colored the vector field based on another scalar quantity. On the right of my figure, I have made a colorbar() . This colorbar() represents the values displayed by imshow() (which can be positive and negative in my case). I'd like to know how I could setup another colorbar which would be based on the values of the scalar quantity upon which the color of the vectors is based.

Drawing a correlation graph in matplotlib

大憨熊 提交于 2019-12-03 07:22:36
问题 Suppose I have a data set of discrete vectors with n=2 : DATA = [ ('a', 4), ('b', 5), ('c', 5), ('d', 4), ('e', 2), ('f', 5), ] How can I plot that data set with matplotlib so as to visualize any correlation between the two variables? Any simple code examples would be great. 回答1: Joe Kington has the correct answer, but your DATA probably is more complicated that is represented. It might have multiple values at 'a'. The way Joe builds the x axis values is quick but would only work for a list

Visualizing set hierarchies as color coded graphs

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 06:57:33
问题 I have been reading quite a bit on graphing libraries for Java and Javascript lately but I haven't found a good way to do what I want to do. Essentially I have a hierarchy of sets with regards to a bunch of elements (up to several thousands). These sets can be fully or partly overlapping, fully covering or completely disjoint from one another. What I would like to do is to display the following information: The size of a set (in relation to the other sets) A "heat" value (in color code) of a

WPF charting/visualization of realtime data

青春壹個敷衍的年華 提交于 2019-12-03 06:18:15
I've been trying to figure out what is the appropriate way to render real-time data as a line graph in WPF. And by real-time I actually mean, data that is being collected from a USB device that generates data at a rate of approximately 40Hz. There are multiple (up to 7) streams of data that I'm reading at 40Hz in an asynchronous fashion. I've tried using two off-the shelf solutions (WPF Toolkit charting and Swordfish charts) and almost looked into the Dynamic Data Visualization component but gave up on it after reading some comments on their forum. It seems that off-the-shelf charting

How to make matplotlib graphs look professionally done like this?

痴心易碎 提交于 2019-12-03 05:09:13
问题 Default matplotlib graphs look really unattractive and even unprofessional. I tried out couple of packages include seaborn as well as prettyplotlib but both of these just barely improves the styles. So far I've gotten to following using seaborn package: Below is the appearance I'm looking for which is far cry from above: Notice the following niceness in the 2nd example: Area under the graph is filled with much more eye pleasing color. The graph line is thinker and nicely stands out. Axis

What is the difference between D3.js and Cytoscape.js? [closed]

烂漫一生 提交于 2019-12-03 05:08:57
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . What is the difference between D3.js and Cytoscape.js? Why would someone choose Cytoscape over D3.js? 回答1: D3 is for charts and mostly static graphs. Cytoscape.js lets you manipulate highly-customisable and interactive graphs, and has an API as easy to use as jQuery. D3 is

How to draw a line or add a text outside of the plot area in R?

三世轮回 提交于 2019-12-03 05:01:12
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 7 years ago . Thank you for reading. I find that I am unable to draw lines/points or add text outside of the plot area. If I draw a line from inside the plot (within the axis) area to the area of the xlab main title areas only the part within the plot shows. In a multiple plot graph (mfrow) the line/point will only be drawn inside the last active plot. plot(0); l=locator(2,type='n'); lines(l

Any 'pretty' data visualization libraries for Python? [closed]

南楼画角 提交于 2019-12-03 04:52:23
问题 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 6 years ago . There are plenty of 'pretty-printing' visualization libraries for Javascript. E.g. those listed here. Googling for 'python visualization libraries' only turns up stuff like VTK and mayavi, which are primarily more for no-nonsense scientific use. So, do you know of any Python libraries similar to those Javascript

Sparklines in ggplot2

与世无争的帅哥 提交于 2019-12-03 04:18:51
问题 Tufte Sparklines (as illustrated in his Beautiful Evidence ) have been replicated in base graphics as part of YaleToolkit and further perfected as a result of this question. Sparklines have also been done in lattice as a part of my small side project Tufte in R (self-promotion not intended). My goal now is to replicate Tufte sparklines in ggplot2 . There are some scripts floating around on Gist and also as a reply to this question on SO, but none of those give a solid base for making