eggoodaire

58 Reputation

4 Badges

15 years, 116 days

MaplePrimes Activity


These are replies submitted by eggoodaire

I am cursed with being a fussy guy, I guess.  The problem with the style=planar option is that you lose control over placement of vertices.  If you want to demonstrate the Dijkstra algorithm, for instance, with a shortest path from A to E, I would like A on the left and E on the right. 

And the reason I started this thread was that, in the absence of an option, Maple assigned positions to edge labels which I did not always like.  I agree, of course, that positioning by hand is a pain!  ................Edgar

 

restart;
with(plots);
with(GraphTheory);


GG := Graph({{1, 2}, {1, 7}, {1, 8}, {2, 3}, {2, 8}, {2, 9}, {3, 4}, {3, 9}, {4, 5}, {4, 10}, {5, 6}, {6, 7}, {6, 10}, {7, 8}, {7, 9}, {9, 10}});
HH := RelabelVertices(GG, [A, B, C, D, E, F, G, H, "I", J]);
vp := [[0, 0], [5, 10], [20, 15], [50, 20], [70, 0], [50, -10], [20, -10], [18, 2], [35, 10], [55, 5]];
SetVertexPositions(HH, vp);
                               I
p1 := DrawGraph(HH);
p2 := textplot({[0, 5, "7"], [8, 3.2, "5"], [10, -7, "8"], [11, 14, "8"], [12, 7, "4"], [15, 11.6, "3"], [21, -4, "5"], [28, 14, "5"], [30, 0, "2"], [35, 19, "8"], [36, -12, "7"], [45, 10, "7"], [50, -2, "10"], [51, 12, "3"], [60, -7, "6"], [60, 12, "4"]}, axes = none);
display(p1, p2);

 

Further comment:  Interesting that I cannot label a vertex I since this has a special meaning, but I can use "I".  So must I not also use "A", "B", and so on.  Fun and games. Again, many thanks Carl for pointing me in the right direction.

 

Thanks very much for the help ..................Edgar

@acer 

 

You are keeping a close watch on me acer, and being a tremendous help!  Many many thanks.  I have completed the worksheet that has been giving me trouble and it is working beautifully.  Thanks again, Edgar

 

@acer 

Wonderful!  Thank you very much.  ............Edgar

I have been having the same problem the past couple of days, and the corrupted file is just a few lines of garbage.  Edgar

@tomleslie 

 

Perfect.  Thank you very much!  .............Edgar

@rlopez 

 

Every symbol in the matrix is surrounded by " " which I can't eliminate.  .............Edgar

 

@Daniel Skoog 

 

I was sure what I wanted had to have been done and probably within Maple somewhere.  I looked hard but never found it.  Thank you for the direction.  ..............Edgar

@Rouben Rostamian  

 

This is very impressive.  Thank you very much. 

Thanks for the help.  this is exactly my problem, penalized by Maple for getting a 64 bit machine.    So many of my programs won't run - or I can't get them to run - under regular Maple.  Why did Maple do this to us?  Is anybody from Maple listening?  ...........Edgar

 

Thanks for the help.  this is exactly my problem, penalized by Maple for getting a 64 bit machine.    So many of my programs won't run - or I can't get them to run - under regular Maple.  Why did Maple do this to us?  Is anybody from Maple listening?  ...........Edgar

 

Page 1 of 1