All Questions
Tagged with graph-visualization python
45 questions
1
vote
1answer
28 views
Draw graph where nodes have data
I have a directed graph that contains some complex data. I want to draw this graph and have each node represented as a table. Is there a way to achieve this?
All plotting examples I find only have a ...
0
votes
0answers
18 views
How to adjust my x-axis and y-axis for my histogram in matplotlib(Python)? [duplicate]
i want to plot a histogram on the closing price of some stocks. I've imported the data through a csv file and have plotted a histogram for one column in my dataframe. The problem is the scale of the x-...
0
votes
0answers
26 views
How can I make these matplotlib bar labels readable? [duplicate]
Apologies if this is a simple question, I am rather new to programming, and am having quite a bit of trouble here. You can see what I'm dealing with below, but the issue is that all of the labels on ...
2
votes
0answers
109 views
Separate node and edge hover tools in Bokeh?
I'm trying to get separate hover tooltips for nodes and edges in Bokeh, but haven't been able to get it to work. Could someone point out what I'm doing wrong? I believe the code should look something ...
0
votes
0answers
225 views
Python basic tree visualization
I'm trying to draw basic tree in Python.
I've tried to use: igraph, plotly, pygraphviz, and nothing works.
Tried to use igraph.
By this link: Error with igraph library - deprecated library
I ...
0
votes
0answers
42 views
How to fix the order of networkx nodes in same level?
I want to plot a two layer of graphic with networkx package within matplotlib figure.
The first layer is node A01~A08, and the second one is node B01~B08. Nodes between layer A and layer B are random ...
0
votes
1answer
340 views
Use of Linear Color mapper in Bokeh
I am intending to create a scatter plot with a linear colormapper. The dataset is the popular Female Literacy and Birthrate dataset.
The plot would have the "GDP per capita" on the x axis and "Life ...
2
votes
0answers
251 views
Visualization of force-driven large graph: python and graphviz
I am working on community detection algorithms, and I am currently trying to visualize the results of Louvain algorithm (https://arxiv.org/abs/0803.0476) on a graph of 70K nodes and 8M edges.
I ...
0
votes
0answers
12 views
plot uncommon part of kdeplot
As you can see this code generate that picture:
dt=pd.DataFrame(np.random.randint(0,100,size=(100, 2)), columns=list('AB'))
dt.A=dt.A.apply(lambda x:1 if x<40 else 0)
g = sns.kdeplot(dt["B"][dt["A"...
0
votes
0answers
48 views
3D Network Graphs with Edge Distance Matrix in Python
I am trying to create a 3D network graph with the Edge Distance Matrix given as a pandas Dataframe. I have tried networkx but I am unable to find a way to specify the edge distances in the graphs I ...
0
votes
1answer
77 views
Plotting Binary Logistic regression with 3 features
I have built a logistic regression model for binary classification. I am trying to develop a visualisation but unable to.
I can do it with two features but my model uses 3 features and hence ...
0
votes
1answer
540 views
Pyqtgraph class: how to automatically update graph values from data buffer?
I am using the pyqtgraph module to make a nice and simple real-time graph. I want to make it as a class/object that can take in a data buffer, and on update, re-read the data buffer to draw the graph. ...
1
vote
0answers
308 views
Python network - node labeling / graph visualization
I am new to Python and trying to visualize a medium size network (nodes=2252 | edges=36075) with networkx. Currently, I have two simple problems which I could not solve, despite some hours of research:...
0
votes
0answers
76 views
Better visualization of a vertical bar plot with matplotlib
Y have a huge RDD from spark that contains the logs of server requests to our server. I want to visualize the requests per day in a period of time; for better visualization I decided to use a ...
0
votes
1answer
568 views
Issue with spacing nodes in networkx graph
I'm trying to make a networkx graph with several hundred edges:
def generate_network_graph(graph):
visual_graph = networkx.Graph()
for edge in graph.edges:
visual_graph.add_edge(edge....
3
votes
2answers
2k views
Keras Visualization of Model Built from Functional API
I wanted to ask if there was an easy way to visualize a Keras model built from the Functional API?
Right now, the best ways to debug at a high level a sequential model for me is:
model = Sequential()...
4
votes
0answers
527 views
Graph only partially displaying in Jupyter Notebook output
I am trying to get a PyLDAvis graph that looks like the 2 shown in this link, that you can see right away (Intertopic Distance Map and Top 30 Most Salient Terms):
http://nbviewer.jupyter.org/github/...
3
votes
0answers
341 views
Matplotlib Hist can't load or is taking too long?
I'm trying to plot a histogram based on monte carlo simulation with 10k iterations. Plotting using plt.plot(price_list) is fine but, the histogram doesn't load or it's taking extremely long(I think).
...
2
votes
2answers
3k views
How to store a networkx graph for visualizing in Gephi?
I am working on a pagerank algorithm using Networkx module in Python. I have a dictionary of lists, where key of the dictionary is the Title of the page and its value is all the Titles referenced ...
1
vote
1answer
1k views
How to stop violin plot cutting off outliers or extreme values
I have a seaborn violin plot on the left, and matplotlib on the right.
As you can see, matplotlib removes some values/data, even with showextrema=True or False, that has no effect. How do I make ...
2
votes
0answers
148 views
How to avoid distortion in 3D plots using Matplotlib
I know that matplotlib is not the best choice for 3D visualization but I have tried in vane to get other packages such as Mayavi to work (my version of openGL prevents it).
My issue is that when I ...
0
votes
0answers
370 views
Plotting a Curve Through a Slope Field in Python
I'm using the following Python code (taken from another SO post that I cannot recall) to graph the slope field of the differential equation dy/dx = 1/(x+y):
import numpy as np
from matplotlib import ...
2
votes
1answer
1k views
Python friends network visualization
I have hundreds of lists (each list corresponds to 1 person). Each list contains 100 strings, which are the 100 friends of that person.
I want to 3D visualize this people network based on the number ...
0
votes
1answer
94 views
3d interactive graph won't update
I was using this code to create an interactive plot (2d), and it works.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button, RadioButtons
fig, ax = plt....
2
votes
0answers
126 views
Intersect several 2-d subplot in MatPlotlib
Familar with Matplotlib and Basemap, but I haven't noticed that some one has tried to plot intersected figure to visualize multi-dimension data.
Here is an practical scene: Satellite data now can ...
4
votes
1answer
3k views
How to draw a small graph with community structure in networkx
The graph has around 100 nodes, and the number of communities ranges from 5 to 20. Is there any way to draw the graph such that the nodes of the same community are close to each other?
I've tried to ...
1
vote
1answer
746 views
Networkx Programatic Network Graph Visualization
Hopefully this question isn't too opinion based. If it is, can you point me in the right direction for this question.
I am hoping to create something simple to visualize a twitter network that has ...
0
votes
2answers
2k views
How can I make my axes visible with matplotlib?
I am using matplotlib.pyplot to plot some graphs and for some reasons I can't see the lines of the axes, although I can see the xticks and yticks. Important to note that I am using python notebook, ...
2
votes
0answers
467 views
maximum_spanning_tree networkx has no attribute
I am trying to find maximum spanning tree of a network using networkx python module.
According to documentation specified[link below], nx.maximum_spanning_tree(G) should do this work. But i am getting ...
8
votes
1answer
2k views
Pydot error: file format “png” not recognized
I need to build a pythonic graph solution through pydot and when tried to run a simple code like:
import pydot
graph = pydot.Dot(graph_type='graph')
i=1
edge = pydot.Edge("A", "B%d" % i)
graph....
0
votes
1answer
737 views
Plotting Time vs Date in matplotlib
I have a .csv file with only two columns in it, date and time:
04-02-15,11:15
04-03-15,09:35
04-04-15,09:10
04-05-15,18:05
04-06-15,10:30
04-07-15,09:20
I need this data to ...
0
votes
1answer
31 views
Can't change the size of the drawing canvas while using graph-tool 2.2.44
I'm trying to use Graph-Tool 2.2.44 on a Mac to visualize some networks with its function graph_tool.draw.graph_draw() in the following way:
gt.graph_draw(g, pos=pos, output_size=(1200, 1200))
...
1
vote
0answers
533 views
Python igraph does not show vertex and edge labels in iPython notebook
I am trying to visualize a simple network with both vertex and edge labels using igraph Python. I am using OS X 10.2.2, Python 2.7.9 Anaconda, igraph 0.7.1, iPython 3.0. When I build the code with a ...
3
votes
1answer
355 views
Node sizes not correct when drawing a graph with many components
I've got a graph with many components which I would like to visualize. As a special feature, the node dots of the nodes in the giant component shall scale with their eigenvector centrality. All the ...
0
votes
0answers
1k views
visualize pairwise similarity matrix which indicates geodesic distances
In Python, I need to visualize a pairwise similarity matrix in a Graph. I want the nodes which are closer to be visualized by a closer distance. What I need is exactly what is mentioned in this link (...
3
votes
2answers
936 views
Changing background color in graph-tool
I'm setting about to use a python package named graph-tool to visualize graphs. For some reason it sets grey background color each time saving a graph, which looks far from pleasant. Anyone knows how ...
3
votes
2answers
3k views
how to Label the edges of a graph using python and graphviz
How to mark edges in a graph constructed using python and xdot
I have figured out a way to construct graph in python using dot language.
import sys
import threading
import time
import networkx as nx ...
3
votes
0answers
522 views
No image from plot in igraph-python
I am loading an edge list file in python-igraph and try to plot it. After the plot command
the image viewer opens saying
No images found in 'file:///tmp/igraph6zGOpj.png
The commands are as follows ...
1
vote
1answer
976 views
How to use port names in record nodes in pydot
I haven't been able to find a way to draw nodes with ports in pydot: neither in the documentation nor in examples on the web.
Is there a way to draw the following graph using pydot?
diagram:
...
8
votes
0answers
1k views
Is there any tool to visualize relations between different Python objects within a package? [closed]
While learning a new Python package it takes a great deal of time to learn about Python objects which makes the package. For example, in Pandas library, there is a method called to_html. It is a ...
1
vote
1answer
530 views
Visualizing x,y,z coordinates in Ruby/Python?
I want to draw a continuous line through coordinate points I have stored in a hash, in 3D if possible, but probably 2D to start with.
I'd like to process about ten points/sec so that I can see the ...
0
votes
2answers
1k views
visualizing edge data for networkx-generated graphviz .dot or GML files
I have generated a graph with networkx, and exported it as a .dot file for vizualization.
The .dot file looks ok, there are the nodes and the node attributes I've created, as well as the edge data (...
19
votes
2answers
19k views
Plotting directed graphs in Python in a way that show all edges separately
I'm using Python to simulate a process that takes place on directed graphs. I would like to produce an animation of this process.
The problem that I've run into is that most Python graph ...
4
votes
1answer
1k views
Interactive visualization of a graph in python [closed]
I have a program written in python using the module networkx to create a dynamic graph. It is a planer graph where the vertices remain constant but the edges change. Now I'm looking for a library that ...
4
votes
2answers
4k views
How can I visualize a Graph in (interactive) 3D with Python?
I have a Graph in Python like this one:
# Each element is a tuple with coordinates (x,y,z).
# The index is the id of the vertex
vertexList = [(0,0,0),(1,0,0),(1,1,0),(0,1,0),
(0,0,1),...