I have a graph with six curves. I have already used all the Mathematica's default plot styles (solid, dashed, dotted, dashed-dotted). So, I need two more plot styles. The natural options would be the dash dash dot "--.--." and dot dot dash "..-..-". I don't want to use symbols (like stars, squares, etc.) as a plot style since the curves represent analytical equations, not numerical simulations. Is there anyway to define these plot styles?

I appreciate any suggestion!


closed as off-topic by Szabolcs, LCarvalho, b.gates.you.know.what, Vitaliy Kaurov, WReach Nov 18 '17 at 2:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, LCarvalho, b.gates.you.know.what, Vitaliy Kaurov, WReach
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Read about Dashing function as an option to create several dashing types $\endgroup$ – José Antonio Díaz Navas Nov 15 '17 at 11:53
  • $\begingroup$ Thanks for the suggestion, but doesn't the Dashing function just change the size of the dash? I'll take a look at it again. $\endgroup$ – Farokh Nov 15 '17 at 11:59
  • $\begingroup$ But also the separation... $\endgroup$ – José Antonio Díaz Navas Nov 15 '17 at 12:00
  • $\begingroup$ Thanks, it's kinda working! I have to play around a bit to make it as I wanted. $\endgroup$ – Farokh Nov 15 '17 at 12:08

Based on suggestion by José Antonio Díaz Navas, here is a minimal code to this question:

l1 = .025;
l2 = .001;
s = l1/2;

Plot[x^2, {x, 0, 2}, PlotStyle -> Dashing[{l1, s, l1, s, l2, s}]]

enter image description here

  • 1
    $\begingroup$ DotDashed is pre-defined (as Dashing[{0, Small, Small, Small}]). $\endgroup$ – Szabolcs Nov 15 '17 at 12:41
  • $\begingroup$ Is there a way to change the colors of these dashed and dotted graphs while keeping the style intact? $\endgroup$ – Samapan Bhadury Jul 21 '18 at 13:33

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