Coder Social home page Coder Social logo

Comments (5)

Islast avatar Islast commented on July 28, 2024 1

We would need to do a bunch of normalisation and write a method to choose a colour (I think I used to pass a lambda function to do that? Definitely not a great way to proceed though!) if you wanted to pursue this. I think the last time we spoke we said that you should have my old work as a reference point but definitely feel free to deviate and reinvent wherever you like. I'm very comfortable with you abandoning all of this. As you say it can always be added in later if we decide we want it

from scona.

Islast avatar Islast commented on July 28, 2024

This is just a method of incorporating the nodal measures that we calculate earlier on. The code should not involve adding new attributes to the nodal measures to inform a plotting function.
What's going on here is that rather than adding node_size_att and node_colour_att to the graph as nodal attributes, you pass the function an existing nodal attribute to use. So for example if I wanted my nodes to be scaled by degree, I would pass node_size_att="degree"to the plotting function.
As for the redundancy of having these parameters, the idea was to allow the user to scale nodes by degree without having to do the wrangling themselves, but I am happy to ditch it if you think it's unnecessary

from scona.

wingedRuslan avatar wingedRuslan commented on July 28, 2024

@Islast okay, that's interesting, I have not thought about it in that way. Thanks for clarifying!

Just to make sure that I understood you correctly. Assume we pass node_size_att="degree" to the plotting function. So the size of each node is determined based on its value of degree measure, right.

If yes, do we need to normalize values to fit into the interval (let's say [2, 8])? Because the degree values could be in the interval [0, len(G.nodes)]. For example, ff degree equals 12, that's a pretty big value for size property while plotting.

And what's going on with choosing a color for each node?

if node_colour_att is not None:
       node_colour_att = [G._node[node][node_colour_att] for node in node_order]

For me, it is not clear because we can't just use the value of degree measure for picking up color. There should be some sort of setup_color_list function where we can select a color from colormap for continuous data.

Well, I would prefer to create plotting functions and after that add these additional features if needed.

from scona.

Islast avatar Islast commented on July 28, 2024

@wingedRuslan is it okay to close this?

from scona.

wingedRuslan avatar wingedRuslan commented on July 28, 2024

@Islast, yep, totally!

from scona.

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.