> Node size should be the same, as I do a conversion in the function. However,
> size is now absolute to the figure not just the axis (I am not sure how
> scatter does this)
There are several ways to do something like this (one being use
scatterplot :). In fact, this just came up the other day on the
matplotlib mailing list. See
so in figures with subplots you have to scale up the
> nodes size. The factor is the number of subplot sections squared. So the
> examples four_grids.py should now have node sizes 4800, 0, 4000, 320. Also
> if you plot interactively, zooming the node or the entire figure actually
> zooms the node size instead of keeping the same approximate node size. I
> don't know if this is desirable or not.
>
> Also it seems to be a little slower. I am testing on a pretty fast machine,
> so if its a significant slow down for anyone I might have to reconsider how
> I do some things.
>
> Attached is the new function, as well as two tests functions for the new
> features. If anyone would like to test it and see if there are any bugs that
> would be great.
These pictures look great!
Jason
> New:
> Actual arrows drawn on DiGraphs
> Can control arrow style, and edge style, including the ability to have arced
> edges, check matplotlib's FancyArrowPatch
> Can use edge weights to scale thickness or edge color
> Can pass keyed dictionary for edge_color and node_color
> Cleaner code (somewhat)
> Different:
> Node size should be the same, as I do a conversion in the function. However,
> size is now absolute to the figure not just the axis (I am not sure how
> scatter does this) so in figures with subplots you have to scale up the
> nodes size. The factor is the number of subplot sections squared. So the
> examples four_grids.py should now have node sizes 4800, 0, 4000, 320. Also
> if you plot interactively, zooming the node or the entire figure actually
> zooms the node size instead of keeping the same approximate node size. I
> don't know if this is desirable or not.
> Also it seems to be a little slower. I am testing on a pretty fast machine,
> so if its a significant slow down for anyone I might have to reconsider how
> I do some things.
> Attached is the new function, as well as two tests functions for the new
> features. If anyone would like to test it and see if there are any bugs that
> would be great.
Thanks for looking at this and updating the code. The arrows are great!
It definitely is slower to render. I'll review the code and see if
there is some way to speed
it up.
Aric
I tryed this and it seems failed
>>> import networkx as nx
>>> G=nx.read_pajek("CrystalC.paj")
ValueError: need more than 1 value to unpack
If you remove the beginning and ending of the file and only leave the
"vertices" and "edges" sections you should be able to read the file.
It looks like NetworkX doesn't support some of the Pajek data file
format sections.
We'd like to - but, as far as I know, there is no specification and
we don't have source to read to reverse engineer it.
Aric
In general, NetworkX will only read/parse Pajek 'network' files
(*.net). The file format you're using (*.paj) is something else: it
can be used to put several networks together into one file, along with
related data structures like partitions and vectors. As far as I know,
those are not supported by NetworkX. (Also, it would complicate the
API, for what would be the return value of nx.read_pajek() in that
case?)
As Aric mentioned, the problem (one of the problems) is that there is
no real specification or source code, so implementing Pajek support is
rather difficult. Perhaps it might help if people could gather some
'real-world' Pajek files to test the NetworkX implementation against?
Best regards,
Raf
--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To post to this group, send email to networkx...@googlegroups.com.
To unsubscribe from this group, send email to networkx-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/networkx-discuss?hl=en.
We could easily make two functions - one to read Pajek .net and the
other to read Pajek .paj (which would return a list of graphs).
Aric
I have removed the beginning and end of the file and only keep "vertices" and
"edges" or "arcs" sections, see the attached file. But I still not able to read
it.
Cheers
Franco
----- Message d'origine ----
De : Aric Hagberg <ahag...@gmail.com>
À : networkx...@googlegroups.com
Envoyé le : Jeu 4 novembre 2010, 18h 36min 44s
Objet : Re: [networkx-discuss] read_pajek
Aric
--
Looks like the blank lines at the end are causing a problem so you'll
need to remove those too. (This we can fix easily in the code).
Aric
----- Message d'origine ----
De : Aric Hagberg <ahag...@gmail.com>
À : networkx...@googlegroups.com
Envoyé le : Jeu 4 novembre 2010, 23h 19min 49s
Objet : Re: Re : [networkx-discuss] read_pajek
Aric
--
Aric
--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To post to this group, send email to networkx...@googlegroups.com.
To unsubscribe from this group, send email to networkx-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/networkx-discuss?hl=en.