0
$\begingroup$

With the drawing pallette I can create free-form graphics, but the built-in styling options only go so far.

Obviously I can create an image somewhere else and then paste it into graphics box, but that is kind of an ad-hoc solution.

Is there a recommended way to create complex styles for objects in the graphics box? By a "complex style" I will give two examples:

(1) Radial fills. A colored background on a rectangle that becomes more intense as it gets towards the edge of the rectangle.

(2) Double line strokes. Sometimes you want a double line instead of single-line stroke (for example to draw a road) and you need to control the distance between the two lines as well.

$\endgroup$
1
$\begingroup$

It is not a satisfactory approach, but such a "Monte Carlo" variant:

 Graphics[Map[{Hue[(#[[1]]^2 + #[[2]]^2)/2], 
    Point[{#[[1]], #[[2]]}]} &, RandomReal[{-1, 1}, {100000, 2}]]]

giving

enter image description here

Here the parameters {-1,1} of the RandomReal fix the rectangle boundaries.

Have fun!

| improve this answer | |
$\endgroup$
  • $\begingroup$ I know how to create radial gradients, that is not the question. The question is how to style free form graphic objects in a graphics box using, for example, a radial gradient. Basically, you do you style or modify the objects in a graphics box. $\endgroup$ – Tyler Durden Sep 25 '15 at 18:11

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