Coder Social home page Coder Social logo

Comments (6)

wiheto avatar wiheto commented on May 24, 2024

Hi!

They are actually there but are being masked by the nodes.

teneto.plot.slice_plot(g_arr, nodesize=10)

Sorry about his. Will try and make some improvement so this doesn't happen again by accident (e.g. by autoscaling nodesize).

from teneto.

wiheto avatar wiheto commented on May 24, 2024

This is the resulting image I get

Figure_4

from teneto.

balandongiv avatar balandongiv commented on May 24, 2024

Thanks for prompt reply.

May I know you plot this graph?

I Tried
teneto.plot.slice_plot(g_arr, nodesize=10)

But, the compiler return an error

TypeError: slice_plot() missing 1 required positional argument: 'ax'

Amend the code to

teneto.plot.slice_plot(g_arr, nodesize=10,ax=ax)

Return an error of

AxesSubplot:xlabel='Time'

Wheras, amending the code as below

import teneto
import matplotlib.pyplot as plt
# g_arr=np.load('g_arr.npy')
plt.style.use('mpl20')
tnet = teneto.TemporalNetwork(from_array=g_arr)
ax = tnet.plot('slice_plot',nodesize=10)
ax.scatter([0,0,0], [0,1,2], s=150, color='red', zorder=50)
plt.show()

produced inconsistent node size (refer slice no 1) as below

amend_gt

from teneto.

wiheto avatar wiheto commented on May 24, 2024

Sorry, should have copy pasted what I did instead of just writing the code (incorrectly). This is what works for me

import numpy as np
import teneto
import matplotlib.pyplot as plt
fig,ax = plt.subplots(1)
g_arr=np.load('g_arr.npy')
teneto.plot.slice_plot(g_arr, ax, nodesize=10)
fig.show()
 

from teneto.

wiheto avatar wiheto commented on May 24, 2024

To fix your figure that you wrote above, you need to change:

ax.scatter([0,0,0], [0,1,2], s=150, color='red', zorder=50)

and change the size of the red scatter plots you are adding in manually

from teneto.

balandongiv avatar balandongiv commented on May 24, 2024

Thanks for the update @wiheto , really appreciate it

from teneto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.