Skip to content

[pyos][visualization] viz.datashade() wrong positioning of matrix elements #473

Open

Description

@szhorvat

I'm not sure if something's wrong with my setup, but with viz.datashade() I am not getting the output I expect. Here's an example:

import graphblas as gb
M=gb.Matrix.from_edgelist([(0,1),(0,3),(2,3)])
gb.viz.datashade(M)
image

This is a 3-by-4 matrix, and this is reflected in the axes ranges ([0,3] vertical, [0,4] horizontal). However, the matrix elements only appear if I zoom out, and they're not positioned at the coordinates corresponding to their indices:

image

Part of: pyOpenSci/software-submission#81

Activity

  1. changed the title [-][pyos] viz.datashade() wrong positioning of matrix elements[/-] [+][pyos][visualization] viz.datashade() wrong positioning of matrix elements[/+] on Jun 25, 2023
  2. eriknw commented on Jun 27, 2023

    @eriknw
    Member

    Oh no! That doesn't look right.

    Testing of viz requires that the output is rendered and viewable, not just that the code runs, so we need to enhance our docs.

    One option I've been considering is to have visualization in a different package similar to how we have algorithms in graphblas-algorithms. I like this for many reasons, including:

    • dependencies handled by it
    • it can have its own documentation
    • this helps keep the scope of python-graphblas narrow (but I still like having most conversions in python-graphblas)
    • other maintainers can "own" a significant package
    • it can be more inviting and easier to contribute to for new contributors

    I think the last point is really important. I think we can make the "barrier of entry" to contribute to graphblas-algorithms and e.g. graphblaz-viz much lower compared to python-graphblas.

  3. eriknw commented on Jun 29, 2023

    @eriknw
    Member

    We discussed viz in our weekly meeting this week.

    Since viz is not a primary purpose of python-graphblas, for now we would like to keep our viz functions to a minimum that we need for documentation. We're open to creating a new graphblas-viz package that could host functions such as datashade. In general, conversions to other common formats (for example, igraph) that have their own visualization should be what we primarily support.

    I'm sad to learn that gb.viz.datashade isn't working properly for you, so thanks for raising the issue. Since it's not a high priority for us atm, maybe we can add some notes to the docstring about it being experimental.

  4. szhorvat commented on Jun 29, 2023

    @szhorvat
    Author

    Since viz is not a primary purpose of python-graphblas, for now we would like to keep our viz functions to a minimum that we need for documentation.

    This is reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions