Questions tagged [graph]

This "graph" tag refers to a graphical data presentation, e.g. chart or diagram. For the mathematical concept use [graph-theory].

A graph is a visual representation of the relationship between two or more variables. Graphs are especially useful for recognizing broad trends or patterns in large data-sets, and thus are often used for visualising scientific data.

Related tags:


For graphs in discrete mathematics (consisting of nodes/vertices and edges/arcs/relationships which connect pairs of these nodes/vertices), please use . You might also include one of the following tags:

  • for questions on graph-related algorithms.
  • for questions on database technologies for persisting and querying graphs.
28721 questions
1590
votes
18 answers

Cycles in family tree software

I am the developer of some family tree software (written in C++ and Qt). I had no problems until one of my customers mailed me a bug report. The problem is that the customer has two children with their own daughter, and, as a result, he can't use my…
Partick Höse
  • 11,121
  • 3
  • 15
  • 9
457
votes
11 answers

Generating statistics from Git repository

I'm looking for some good tools/scripts that allow me to generate a few statistics from a git repository. I've seen this feature on some code hosting sites, and they contained information like... commits per author commits per…
BastiBen
  • 19,679
  • 11
  • 56
  • 86
390
votes
8 answers

Python Graph Library

I'm writing a python application that will make heavy use of a graph data structure. Nothing horribly complex, but I'm thinking some sort of graph/graph-algorithms library would help me out. I've googled around, but I don't find anything that…
cpatrick
  • 4,446
  • 4
  • 18
  • 11
364
votes
5 answers

Plotting two variables as lines using ggplot2 on the same graph

A very newbish question, but say I have data like this: test_data <- data.frame( var0 = 100 + c(0, cumsum(runif(49, -20, 20))), var1 = 150 + c(0, cumsum(runif(49, -10, 10))), date = seq(as.Date("2002-01-01"), by="1 month",…
fmark
  • 57,259
  • 27
  • 100
  • 107
336
votes
13 answers

Generating a PNG with matplotlib when DISPLAY is undefined

I am trying to use networkx with Python. When I run this program it get this error. Is there anything missing? #!/usr/bin/env python import networkx as nx import matplotlib import matplotlib.pyplot import matplotlib.pyplot as…
krisdigitx
  • 7,068
  • 20
  • 61
  • 97
237
votes
18 answers

Good Java graph algorithm library?

Has anyone had good experiences with any Java libraries for Graph algorithms. I've tried JGraph and found it ok, and there are a lot of different ones in google. Are there any that people are actually using successfully in production code or would…
Nick Fortescue
  • 43,045
  • 26
  • 106
  • 134
209
votes
6 answers

Set Colorbar Range in matplotlib

I have the following code: import matplotlib.pyplot as plt cdict = { 'red' : ( (0.0, 0.25, .25), (0.02, .59, .59), (1., 1., 1.)), 'green': ( (0.0, 0.0, 0.0), (0.02, .45, .45), (1., .97, .97)), 'blue' : ( (0.0, 1.0, 1.0), (0.02, .75, .75),…
Paul
  • 16,285
  • 13
  • 41
  • 52
177
votes
10 answers

Force R to stop plotting abbreviated axis labels (scientific notation) - e.g. 1e+00

In ggplot2 how can I stop axis labels being abbreviated - e.g. 1e+00, 1e+01 along the x axis once plotted? Ideally, I want to force R to display the actual values which in this case would be 1,10. Any help much appreciated.
JPD
  • 2,561
  • 5
  • 22
  • 26
177
votes
14 answers

Command-line Unix ASCII-based charting / plotting tool

Is there a good command-line UNIX charting / graphing / plotting tool out there? I'm looking for something that will plot xy points on an ASCII graph. Just to clarify, I'm looking for something that will output a graph in ASCII (like ascii-art…
bajafresh4life
  • 12,491
  • 5
  • 37
  • 46
175
votes
12 answers

How does Dijkstra's Algorithm and A-Star compare?

I was looking at what the guys in the Mario AI Competition have been doing and some of them have built some pretty neat Mario bots utilizing the A* (A-Star) Pathing Algorithm. (Video of Mario A* Bot In Action) My question is, how does A-Star…
KingNestor
  • 65,976
  • 51
  • 121
  • 152
162
votes
11 answers

What is better, adjacency lists or adjacency matrices for graph problems in C++?

What is better, adjacency lists or adjacency matrix, for graph problems in C++? What are the advantages and disadvantages of each?
magiix
  • 1,711
  • 2
  • 13
  • 11
158
votes
5 answers

How to plot multiple functions on the same figure

How can I plot the following 3 functions (i.e. sin, cos and the addition), on the domain t, in the same figure? import numpy as np import matplotlib.pyplot as plt t = np.linspace(0, 2*np.pi, 400) a = np.sin(t) b = np.cos(t) c = a + b
user3277335
  • 1,947
  • 2
  • 15
  • 16
157
votes
6 answers

how to draw directed graphs using networkx in python?

I have some nodes coming from a script that I want to map on to a graph. In the below, I want to use Arrow to go from A to D and probably have the edge colored too in (red or something). This is basically, like a path from A to D when all other…
brain storm
  • 30,124
  • 69
  • 225
  • 393
156
votes
17 answers

Dependency graph of Visual Studio projects

I'm currently migrating a big solution (~70 projects) from VS 2005 + .NET 2.0 to VS 2008 + .NET 3.5. Currently I have VS 2008 + .NET 2.0. The problem is that I need to move projects one by one to new .NET framework ensuring that no .NET 2.0 project…
Migol
  • 8,161
  • 8
  • 47
  • 69
156
votes
4 answers

Representing graphs (data structure) in Python

How can one neatly represent a graph in Python? (Starting from scratch i.e. no libraries!)What data structure (e.g. dicts/tuples/dict(tuples)) will be fast but also memory efficient?One must be able to do various graph operations on it. As pointed…
shad0w_wa1k3r
  • 12,955
  • 8
  • 67
  • 90
1
2 3
99 100