Skip to content

Filter labels of graph using gephi-toolkit-0.9.1 #5

Closed
@mari-mari

Description

@mari-mari

I would like resulting graph to contain all nodes, but to show labels only for those with degree>1000.
Call of exportToLabelVisible(query) changes labels of nodes to be not visible (node.isVisible() is false), but resulting graph still has labels for all the nodes.

FilterController filterController = Lookup.getDefault().lookup(FilterController.class); 
DegreeRangeFilter degreeFilter = new DegreeRangeFilter(); 
degreeFilter.init(graphModel.getGraph()); 
degreeFilter.setRange(new Range(1000, Integer.MAX_VALUE));     
Query query = filterController.createQuery(degreeFilter); 
       
 
filterController.exportToLabelVisible(query);
//filterController.filterVisible(query);
   
GraphView view = graphModel.getGraphVisible().getView();             
graphModel.setVisibleView(view);
  

PNGExporter pngExporter = (PNGExporter) ec.getExporter("png");
ec.exportFile(new File("FILE.png"), pngExporter);

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