# Changing from Dashed to Solid

I have:

Graphics[{
Blue, Thick,
Arrow[{{0, 0}, f1}],
Arrow[{{0, 0}, f2}],
Red, Arrow[{{0, 0}, f1 + f2}],
Dashed, Blue,
Line[{{-9, 0}, {12, 0}}]
}]

Which produces this image.

Now, I want to continue, adding another line to my code, after the last line. I want to change from Dashed to solid again. How do I do that?

f1 = 10 {Cos[135 \[Degree]], Sin[135 \[Degree]]};
f2 = 12 {Cos[30 \[Degree]], Sin[30 \[Degree]]};

Followed by:

Graphics[{
Blue, Thick,
Arrow[{{0, 0}, f1}],
Arrow[{{0, 0}, f2}],
Red, Arrow[{{0, 0}, f1 + f2}],
Dashed, Blue,
Line[{{-9, 0}, {12, 0}}],
Dashing[None],
Arrow[Table[5 {Cos[t], Sin[t]}, {t, 0, \[Pi]/6, \[Pi]/100}]],
Arrow[Table[3 {Cos[t], Sin[t]}, {t, 0, 3 \[Pi]/4, \[Pi]/100}]],
Red, Arrow[Table[4 {Cos[t], Sin[t]}, {t, 0, 1.3, \[Pi]/100}]],
Text[Style[“F1”, Blue], f1, {0, -1}],
Text[Style[“F2”, Blue], f2, {0, -1}],
Text[Style[“F1+F2”, Red], f1 + f2, {0, -1}],
Text[Style[“30\[Degree]”, Blue],
5.5 {Cos[13 \[Degree]], Sin[13 \[Degree]]}, {-1, 0}],
Text[Style[“135\[Degree]”, Blue],
3.5 {Cos[100 \[Degree]], Sin[100 \[Degree]]}, {0, -1}],
Text[Style[“\[Theta]”, Red],
4.5 {Cos[50 \[Degree]], Sin[50 \[Degree]]}, {0, -1}],
}]

Which produces the following image.

=================

1

Within Graphics[], you can use lists to localize the effect of a directive on a primitive. So, Graphics[{Blue, Line[{{0, 0}, {1, 0}}], Line[{{0, 0}, {1, 1}}]}] will render both lines blue, but Graphics[{{Blue, Line[{{0, 0}, {1, 0}}]}, Line[{{0, 0}, {1, 1}}]}] will only have the horizontal line be blue.
– J. M.♦
May 24 ’15 at 4:28

=================

1

=================

Here are two ways.

Using Dashing[None] to turn off dashing.

Graphics[{
Dashed, Blue, Line[{{-9, 0}, {12, 0}}],
Dashing[None], Line[{{-9, -4}, {12, 4}}]}]

Using sub-lists to control the scope of directives.

Graphics[{
Blue,
{Dashed, Line[{{-9, 0}, {12, 0}}]},
Line[{{-9, -4}, {12, 4}}]}]

Both produce

1

Also Dashing[{}] specifies that lines should be solid (from the docs)
– Dr. belisarius
May 24 ’15 at 4:36