problem in plotting a network using `show`
See original GitHub issueHello @marcomusy
I’ve the following to plot a dataset using show
data1 = dict(zip(time, df1.values.tolist()))
data2 = dict(zip(time, df1.values.tolist()))
ts = [0, 1, 2, 3]
for t in ts:
pts.cmap('Blues', data1[t], vmin=0, vmax=234)
if t == 0.0:
pts.addScalarBar()
show(pts, edg, axes=True, bg='black', at=ts.index(t), shape=(2, len(ts)))
else:
show(pts, edg, axes=True, bg='black', at=ts.index(t))
pts.cmap('Blues', data2[t], vmin=0, vmax=234)
if t != ts[-1]:
show(pts, edg, axes=True, bg='black', at=ts.index(t)+4)
else:
show(pts, edg, axes=True, bg='black', at=ts.index(t)+4, interactive=True)
The problem is, in the 2 x 4 grid that is created, the pts
data is not appended to the frame while looping through t
instead it is overwritten. i.e in the first row: the plot added at =0
in the first iteration is overwritten by the plot generated for displaying at=2
in the second iteration. The same problem occurs in the second row. The plot added at =1
in the first iteration is overwritten by the plot generated for displaying at=3
in the second iteration.
Suggestions on how to avoid overwriting will be helpful.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
networking - How to fix nodes when plotting a subset over a ...
My target is to overlay both networks, so that one can see the complete network netX in the background and the subset netY...
Read more >Network visualization with R
In this tutorial, we will work primarily with two small example data sets. Both contain data about media organizations. One involves a network...
Read more >Python | Visualize graphs generated in NetworkX using ...
In this article, we will be discussing how to plot a graph generated by NetworkX in Python using Matplotlib. NetworkX is not a...
Read more >5.4 Plotting the network in igraph - George G. Vega Yon
5.4.1 Single plot. Let's take a look at how does our network looks like when we use the default parameters in the plot...
Read more >"This plotter configuration cannot be used..." when plotting ...
This warning appears because the plot configuration referenced by the drawing has one or more of the following problems:.
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
This is one possibility, removing the separator frames:
I updated the code with a better solution probably!
that’s correct… because you are plotting the same object onto different renderers but then you change its colors… Make a clone copy instead, and change the copy:
pts2 = pts.clone().cmap('Blues', values[1])