Skip to content

Error importing and executing Circosplot.  #687

@hypowergravity

Description

@hypowergravity
  • nxviz version: nxviz-0.7.4
  • Python version: Python 3.9.6
  • Operating System: Ubuntu 20.10

Description

I was trying to import the CircosPlot method and plot the graph.

What I Did

Input
-> from nxviz.plots import CircosPlot
Output
ImportError: cannot import name 'CircosPlot' from 'nxviz.plots' (/media/hp/software/conda/envs/amber/lib/python3.9/site-packages/nxviz/plots.py)

Next I tried to import the Circos plot using import nxviz as nv
When I tried to add more argument I am not able to plot the Circos plot.
The input comment I used is

import nxviz as nv

c = nv.CircosPlot(graph=g,figsize=(13, 13),node_grouping="class", node_color="class",
               edge_width="weight",node_labels=True)
c.draw()
Error :
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Input In [47], in <cell line: 1>()
----> 1 c = nv.CircosPlot(G,node_grouping="class", node_color="class",edge_width="weight",node_labels=True)
      2 c.draw()

File /media/hp/software/conda/envs/amber/lib/python3.9/site-packages/nxviz/api.py:337, in CircosPlot.__init__(self, G, **kwargs)
    335 def __init__(self, G, **kwargs):
    336     super().__init__()
--> 337     func_kwargs = {object_to_functional[k]: v for k, v in kwargs.items()}
    338     self.fig = plt.figure()
    339     self.ax = circos(G, **func_kwargs)

File /media/hp/software/conda/envs/amber/lib/python3.9/site-packages/nxviz/api.py:337, in <dictcomp>(.0)
    335 def __init__(self, G, **kwargs):
    336     super().__init__()
--> 337     func_kwargs = {object_to_functional[k]: v for k, v in kwargs.items()}
    338     self.fig = plt.figure()
    339     self.ax = circos(G, **func_kwargs)

KeyError: 'node_labels'

I was trying to replicate the given tutorial page .
Kindly please guide.
Thank you

Sriram.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions