Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm having some problems with the Mathematica graphics inspector. I want to make a graph with the following code:

GraphPlot[{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}},
    DirectedEdges -> True, MultiedgeStyle -> True, SelfLoopStyle -> True]

Mathematica graphics

Which results in a good looking graph. But when I use Graphics Inspector to alter the weight of the edges, it gives me an error and Mathematica closes. Does anyone else have ever experienced this? Or do you have another solution for me to achieve my graph with weighted edges?

I'm using Mathematica version 7.

share|improve this question
There were several syntax errors in your code which I corrected. How could this ever have produce a working graph? And what do you mean with "Graphics Inspector"? Do you mean the Drawing Tools palette? I don't have any problems changing line thickness using Win-7 Mathematica version 8.04 and the palette. –  Sjoerd C. de Vries Nov 18 '12 at 12:10
I'm sorry for not using the brackets, i couldn't just copy paste my code since it crashed. If you right click on the picture you can select graphics inspector and with graphics inspector you can change the line thickness but in my case it crashed. I got a runtime error and the error log said that {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,1} is not an exspected array6 –  user1792605 Nov 18 '12 at 12:26
I've been using v8 for too long, but from the mists of my memory I seem to remember that in v7 it used to be called a Graphics Inspector indeed. –  Sjoerd C. de Vries Nov 18 '12 at 12:32
You could try EdgeRenderingFunction to programmetically set edge thickness. –  Sjoerd C. de Vries Nov 18 '12 at 12:33
add comment

1 Answer

You can try EdgeRenderingFunction to set edge thickness:

GraphPlot[{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, 
 DirectedEdges -> True, MultiedgeStyle -> True, SelfLoopStyle -> True,
  EdgeRenderingFunction -> ({Darker[Red], Thickness[0.01], 
     Arrow[#1, .05]} &)]

thick graph

share|improve this answer
I don't think you should mark this and the other answer as community wiki. –  Kuba Aug 22 '13 at 9:52
These are questions whose answer is already in the comments. I was randomly going through them and abiding to these guidelines –  gpap Aug 22 '13 at 9:54
Ah, yes, well I do not agree with this policy :) I think it is wrong habit to put answers in comments. Also, I think one should be rewarded for putting his effort in creating and answer with valid code. –  Kuba Aug 22 '13 at 9:58
Well, it's not exactly like they're flooding with upvotes so neither me nor whoever posted the answer in the comments is missing out on reputation. It's just that there's about a thousand of these and my guess (from whatever limited archaeology I have done) is that there must be at least a third that are answered in the comments and nobody bothered since. –  gpap Aug 22 '13 at 10:09
By reward I do not mean +15, +1 is reasonable for helping tiding this site :). They may not be popular but they are not closed, so they can be useful for future visitors. –  Kuba Aug 22 '13 at 10:15
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.