data-visualization

Plot all columns in a file using gnuplot without specifying number of columns

我只是一个虾纸丫 提交于 2019-12-07 07:03:22
问题 I have large number of files of data which I want to plot using gnuplot. The files are in text form, in the form of multiple columns. I wanted to use gnuplot to plot all columns in a given file, without the need for having to identify the number of the columns to be plotted or even then total number of columns in the file, since the total number of columns tend to vary between the files I am having. Is there some way I could do this using gnuplot? 回答1: There are different ways you can go

Custom MarkerStyles possible in Microsoft Chart Controls? [duplicate]

帅比萌擦擦* 提交于 2019-12-07 06:56:16
问题 This question already has an answer here : .NET Charting Legend Marker Size (1 answer) Closed 3 years ago . I'm using Microsoft Chart Controls (4.0), and have a line chart with several marker types. So much so, that I'm running out of markertypes. The defaults (square, triangle, circle, etc.) are insufficient. Is it possible to add custom marker type images? For instance, I need a triangle pointed in the opposite direction. 回答1: You can create a opposite direction triangle image and set the

Making a weighted USA map based on state-level data

最后都变了- 提交于 2019-12-07 05:31:28
问题 I have a list of state-level data with numbers for each state, e.g.: AL 10.5 AK 45.6 AZ 23.4 AR 15.0 ... and I want to make it into a weighted map, with darkest where the number is highest and lightest here it is lowest. Is there any software, or a java or python library that can generate such an image? 回答1: If you want to build it yourself, all you need is a good map, a set of positions for each state in this map, and flood fill. Using the map http://www.clker.com/cliparts/S/r/a/w/L/0/black

plotting 3d histogram/barplot in python matplotlib

笑着哭i 提交于 2019-12-07 04:23:11
问题 I have an Nx3 matrix in scipy/numpy and I'd like to make a 3 dimensional bar graph out of it, where the X and Y axes are determined by the values of first and second columns of the matrix, the height of each bar is the third column in the matrix, and the number of bars is determined by N. In other words, if "data" is the matrix then: data[:, 0] # values of X-axis data[:, 1] # values of Y-axis data[:, 2] # values of each Z-axis bar and there should be one bar for each len(data) How can I do

Google chart timeline horizontal scroll

核能气质少年 提交于 2019-12-07 03:35:54
问题 I have a timeline chart, very similar to the very first example at this page (https://developers.google.com/chart/interactive/docs/gallery/timeline). I have activities on the Y axis (making lunch, eating, ecc) and on the X axis i have the time. I want to enable horizontal scroll and chart zoom in/out (As mentioned in this topic Google chart horizontal scrollbar). But i can't seem to get it working. is there some way to enable horizontal scrolling on the timeline chart? Many thanks. Alessandro

How to measure the area of a polygon in ggplot2?

喜欢而已 提交于 2019-12-07 03:09:27
Hi everyone, I have a number of samples that I would like to draw a polygon for each of them to illustrate the shape of the data. My data look likes this: 01 0.31707317 02 0.12195122 03 0.09756098 04 0.07317073 05 0.07317073 06 0.07317073 07 0.07317073 08 0.07317073 09 0.04878049 10 0.04878049 I can easily draw a radar chart using radarchart, which looks like this: But I am trying to measure the area of the results shape and use that as a measure of data shape. This is where I struggle. I tried to save the resulting figure as a vector and use the points there but it looks like I can not pass

annotating many points with text in mayavi using mlab

放肆的年华 提交于 2019-12-07 02:24:20
问题 I'm trying to annotate points plotted with the points3d() function using mayavi.mlab. Each point is associated with a label which I would like to plot next to the points using the text3d() function. Plotting the points is fast, however the mlab.text3d() function does not seem to accept arrays of coordinates, so I have to loop over the points and plot the text individually, which is very slow: for i in xrange(0, self.n_labels): self.mlab_data.append( mlab.points3d( pX[self.labels == self.u

Time series visualization for start, end, duration in R

岁酱吖の 提交于 2019-12-06 15:59:51
问题 I have the following data: > Data Date Start End 1 2011-11-15 12:01:27 12:30:15 2 2011-11-16 12:01:25 12:32:15 3 2011-11-17 12:01:02 12:39:12 4 2011-11-19 12:01:12 12:30:18 to which I've also appended a Duration column Data[,4] <- as.numeric(difftime(Data$End,Data$Start)) names(Data)[4] <- "Duration" I have in my head a visualization for Start,End that looks kind of like a stock candlestick or OHLC chart, where the x value is the Date, and y is End - Start. End is at the top with a rectangle

How to set node size and color in bokeh network graph?

会有一股神秘感。 提交于 2019-12-06 15:46:26
If we take the standard Karate Club example, how do I change the color and size of the nodes according to their degree? import networkx as nx from bokeh.io import show, output_file from bokeh.models import Plot, Range1d, MultiLine, Circle, HoverTool, TapTool, BoxSelectTool from bokeh.models.graphs import from_networkx, NodesAndLinkedEdges, EdgesAndLinkedNodes from bokeh.palettes import Spectral4 G=nx.karate_club_graph() plot = Plot(plot_width=400, plot_height=400, x_range=Range1d(-1.1,1.1), y_range=Range1d(-1.1,1.1)) plot.title.text = "Graph Interaction Demonstration" plot.add_tools(HoverTool

Heatmap with matplotlib

懵懂的女人 提交于 2019-12-06 15:36:06
I have a set of 3-tuples, each 3-tuple consists of (var1, var2, result). Example of a list of 9 3-tuples: <type 'list'>: [(4, 0.7, 0.8530612244898, 0.016579670213527985), (4, 0.6, 0.8730158730157779, 0.011562402525241757), (6, 0.8, 0.8378684807257778, 0.018175985875060037), (4, 0.8, 0.8605442176870833, 0.015586992159716321), (2, 0.8, 0.8537414965986667, 0.0034013605443334316), (2, 0.7, 0.843537414966, 0.006802721088333352), (6, 0.6, 0.8480725623582223, 0.01696896774039503), (2, 0.6, 0.84693877551025, 0.010204081632749995), (6, 0.7, 0.8577097505669444, 0.019873637350220318)] Now I'd like to