plotting time-series data over a network
See original GitHub issueHi @marcomusy
I am trying to plot time series data related to nodes of a graph
import networkx as nx
from vedo import *
G = nx.gnm_random_graph(n=10, m=15, seed=1)
nxpos = nx.spring_layout(G)
nxpts = [nxpos[pt] for pt in sorted(nxpos)]
nx_lines = []
for i, j in G.edges():
p1 = nxpos[i].tolist() + [0] # add z-coord
p2 = nxpos[j].tolist() + [0]
nx_lines.append([p1, p2])
nx_pts = Points(nxpts, r=12)
nx_edg = Lines(nx_lines).lw(2)
# node values
values = [[100, .80, .10, .79, .70, .60, .75, .78, .65, .90],[1, .80, .10, .79, .70, .60, .75, .78, .65, .10],[1000, .30, .10, .79, .70, .60, .75, .78, .65, .90]]
time = [0, 0.1, 0.2] # in seconds
for val,t in zip(values, time):
nx_pts.pointColors(val, cmap='YlGn', vmin=min(val), vmax=max(val)).addScalarBar()
show(nx_pts, nx_edg, nx_pts.labels('id'), interactive=True, bg='black', title=f'{t} seconds')
I intend to create multiple frames with time stamp displayed in each frame. I couldn’t achieve this using the above code. Suggestions on how to visualize the data over time will be highly appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
5 types of plots that will help you with time series analysis
A time plot is basically a line plot showing the evolution of the time series over time. We can use it as the...
Read more >The Complete Guide to Time Series Data - Clarify.io
Scatter plots are usually used as a way to visualize random variables in time series data.
Read more >Time Series Data Visualization with Python
In this tutorial, you will discover 6 different types of plots that you can use to visualize time series data with Python.
Read more >From time series to complex networks: The visibility graph
In this article we present a tool in time series analysis: the visibility graph. This algorithm maps a time series into a network....
Read more >How to visualize time series data - InfoWorld
Visualizing time series data can help detect patterns, outliers that defy those patterns, whether the data is stationary or non-stationary, and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve checked the version and it’s vtk8.1.2. I could see the correct images in the interactive mode, the problem is while the images are saved. first 2 images are black
EDIT: I’ve installed vtk9.0.1 now and finally, I’m able to view the correct images.
Hi, try the following: