Group Abstract Group Abstract

Message Boards Message Boards

0
|
10.6K Views
|
13 Replies
|
12 Total Likes
View groups...
Share
Share this post:

Set PlotStyle to distinguish 6 lines without using colors? Dotted, Dashed..

If I have a plotting with 6 lines and I want to distinguish between them without colours, like (Dotted, Dashed, DotDashed). What's about the other three lines?

Attachments:
POSTED BY: Aymen Amer
13 Replies

Without knowing anything about the graphics standards you have to work to, and steeped in the study of Tufte, my personal preference would be, FWIW:

Plot[{B1@z, B2@z, B3@z, B4@z, B5@z, B6@z}, {z, -0.3, 0.3}, 
 PlotStyle -> Table[GrayLevel[0.1 + 0.13 j], {j, 1, 6}], 
 PlotLegends -> {"d = 0.1mm", "d = 0.09mm", "d = 0.08mm", 
   "d = 0.07mm", "d = 0.06mm", "d = 0.05mm"}
 , LabelStyle -> "Background" -> White, 
 AxesLabel -> {"z(mm)", "Magnetic Field at(Bo=0.01T)"}]

Cheers, Fred

POSTED BY: Fred Klingener

The "Monochrome" plot theme will generate 6 distinct plot styles without further input:

Plot[{B1 @ z, B2 @ z, B3 @ z, B4 @ z, B5 @ z, B6 @ z},
    {z, -0.3, 0.3},
    PlotTheme -> "Monochrome", PlotLegends -> "Expressions"
] 

enter image description here

POSTED BY: Jason Biggs

Dear Jason Biggs,

Can you send the code in the attached file, please?

POSTED BY: Aymen Amer

This could be a working case accordint to Jason:

Plot[{Sin[z], Sin[2 z], Sin[3 z], Sin[4 z], Sin[5 z], 
  Sin[6 z]}, {z, -0.3, 0.3}, PlotTheme -> "Monochrome", 
 PlotLegends -> "Expressions"]
POSTED BY: Shenghui Yang

Can you send the code in the attached file, please?

The notebook you posted above defines the functions B1 through B6, and the plotting is done using the code in my post.

POSTED BY: Jason Biggs

Thanks, Dr Hans

That was very useful to me.

POSTED BY: Aymen Amer
POSTED BY: Hans Dolhaine
POSTED BY: Aymen Amer

Perhaps like this? (To be properly modified!)

f1 = x^2;
f2 = x^3;
t1 = Table[Text[1, {j - 1, f1 /. x -> j - 1}], {j, 0, 5, .4}];
t2 = Table[Text[2, {j - 1, f2 /. x -> j - 1}], {j, 0, 5, .4}];
p1 = Plot[{f1, f2}, {x, 0, 4}];
Show[p1, Graphics /@ {t1, t2}]
POSTED BY: Hans Dolhaine

These examples Just for 3 lines.

If we have 6 lines how can we distinguish between them??? 1- Dotted 2-Dashed 3-DotDashed 4-Normal line(Black) 5-.........???? 6-..........????

POSTED BY: Aymen Amer

Maybe this helps:

Website1

Website2

POSTED BY: Mariusz Iwaniuk

You may want to try

Plot[{B1[z], B2[z], B3[z], B4[z], B5[z], B6[z]}, {z, -0.3, 0.3}, 
 AxesLabel -> {"z(mm)", "Magnetic Field at(Bo=0.01T)"}, 
 AxesStyle -> Thick, 
 PlotStyle -> ({Black, #} & /@ {Thick, Dotted, Dashed, DotDashed, Dotted, Dashed})]

Is it that what you wanted?

POSTED BY: Hans Dolhaine

Yes like this but here the utilization of (Dotted and Dashed) in twic time. I want every line different from other in the form.

POSTED BY: Aymen Amer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard