title: Graph-Drawing / TSP-Route-Drawing in C++ with "known" coordinates: How? Which Library/Tool?
body: <p>i'm developing some kind of heuristics for a variation of the vehicle-routing-problem in C++.</p>
  
  <p>After generating a solution, i want to plot this solution. The solution is a composite of various tours, all starting and ending at a common depot.
  Therefore i have a vertex-set with all the coordinates and edges defined by two vertex-id's each. Furthermore i have all the distances between vertex-pairs of course.</p>
  
  <p>It would be helpful to plot this in an extra-window opening in my program, but writing a plot to a graphics-file should be okay too.</p>
  
  <p><em>What is an easy way to plot this? How would you tackle this?</em></p>
  
  <p>First i tried to look for common graph-visualization packages (graphviz, tulip, networkx (python)), but i realized that all of them are specialized at graph-layouting (when there are no coordinates). Correct me when i'm wrong.
  I don't know if it is possible to tell these packages that i already have the coordinates, helping the layouting-algorithms.</p>
  
  <p>Next thing i tried is the CGAL library with geomview output -> no luck until now -> ubuntu crashes geomview.</p>
  
  <p><em>One more question: Is it a better idea to use some non-layouting 2d-plot-libraries risking a plot, which isn't really good to view at (is there more to do than scaling?) or to use some layout-algorithm-based-libraries (e.g. graphviz, tulip, networkx), feed them with the distances between the vertices and hope the layouting-algorithms are keeping the distances while plotting in a good-to-view-at way?</em></p>
  
  <ul>
  <li>If non-layouting-plotting is the way to do it: which library do you recommend?</li>
  <li>If layout-based-plotting is the way to do it: how can i make use of the distances/coordinates in these libraries? And which library do you recommend?</li>
  </ul>
  
  <p>Thanks for all your input!</p>
  
  <p>Sascha</p>
  
  <p><strong>EDIT:</strong> I completed a prototype implementation using the PLplot library (http://plplot.sourceforge.net/). The results are nice and should be enough for the moment. I discovered and chosed this library because a related project (VRPH Software Package / Groer) used this plot and the source code was distributed. So the implementation was done in a short amount of time. The API is in my opinion bit awkward and low-level. Maybe there are some more modern (maybe not a c-based library) libraries out there? MathGL? Dislin? Maybe i will try them too.</p>
  
  <p>The nice thing about drawing multiple tours in a vehicle routing problem is that "not so bad" algorithms tend to discover nice non-overlapping and divergent tours which is really good for the eye ;-)</p>