Representing graphs (data structure) in Python

Even though this is a somewhat old question, I thought I’d give a practical answer for anyone stumbling across this. Let’s say you get your input data for your connections as a list of tuples like so: [(‘A’, ‘B’), (‘B’, ‘C’), (‘B’, ‘D’), (‘C’, ‘D’), (‘E’, ‘F’), (‘F’, ‘C’)] The data structure I’ve found to … Read more

Command-line Unix ASCII-based charting / plotting tool

Try gnuplot. It has very powerful graphing possibilities. It can output to your terminal in the following way: gnuplot> set terminal dumb Terminal type set to ‘dumb’ Options are ‘feed 79 24’ gnuplot> plot sin(x) 1 ++—————-**—————+—-**———–+——–**—–++ + *+ * + * * + sin(x) ****** + 0.8 ++ * * * * * * … Read more

Plotting time in Python with Matplotlib

Update: This answer is outdated since matplotlib version 3.5. The plot function now handles datetime data directly. See https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.pyplot.plot_date.html The use of plot_date is discouraged. This method exists for historic reasons and may be deprecated in the future. datetime-like data should directly be plotted using plot. If you need to plot plain numeric data as … Read more

Good Java graph algorithm library? [closed]

If you were using JGraph, you should give a try to JGraphT which is designed for algorithms. One of its features is visualization using the JGraph library. It’s still developed, but pretty stable. I analyzed the complexity of JGraphT algorithms some time ago. Some of them aren’t the quickest, but if you’re going to implement … Read more

Python Graph Library [closed]

There are two excellent choices: NetworkX and igraph I like NetworkX, but I read good things about igraph as well. I routinely use NetworkX with graphs with 1 million nodes with no problem (it’s about double the overhead of a dict of size V + E) If you want a feature comparison, see this from … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)