Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please choose the BUG template from the drop-down menu, and fill out the required information.

  • Tiago Peixoto
  • graph-toolgraph-tool
  • Issues
  • #280
Closed
Open
Issue created Mar 10, 2016 by Ian@itcarroll

graph_draw bug with edge_control_points

The following snippet produces an output with nice curvey edges:

from graph_tool import load_graph, Graph 
from graph_tool.draw import graph_draw 

g = Graph()                                                                                                                                                                         
g.add_vertex(4)                                                                                                                                                                     
pos = g.new_vertex_property('vector<float>')                                                                                                                                       
pos[g.vertex(0)] = [0, 0]                                                                                                                                                           
pos[g.vertex(1)] = [0, 1]                                                                                                                                                           
pos[g.vertex(2)] = [1, 0]                                                                                                                                                           
pos[g.vertex(3)] = [1, 1]                                                                                                                                                           
g.add_edge(g.vertex(0), g.vertex(3))                                                                                                                                               
g.add_edge(g.vertex(1), g.vertex(2))                                                                                                                                               
g.vertex_properties['pos'] = pos                                                                                                                                                   
ctl = g.new_edge_property('vector<float>') 
for e in g.edges(): 
    ctl[e] = [0, 0, 0.25, 0.2, 0.75, 0.2, 1, 0] 
graph_draw(g, pos=g.vp.pos, edge_control_points=ctl, output='tmp.eps') 

But when I replace the graph here with one loaded from the attached .gt file, I get no edges drawn at al. If I take out the pos argument though, the curvey edges come back.tmp.gt

Assignee
Assign to
Time tracking