1
$\begingroup$

I need to plot multiple series in the same figure. As the picture will be printed in white and black only, how can I differentiate these series so that readers can identify them from each other? Thanks!

$\endgroup$
  • 1
    $\begingroup$ @Bill, he doesn't want colors since he'll be printing in black and white; this calls for using different shapes as the plot markers. Maybe different dashing and thickness styles too if the points are joined. $\endgroup$ – J. M. is in limbo Jun 4 '16 at 4:37
6
$\begingroup$
data = Table[
   PDF[BinomialDistribution[50, p], k], {p, {0.3, 0.5, 0.8}}];

DiscretePlot[
 Evaluate@data, {k, 1, 50},
 PlotStyle -> {
   Directive[Black, Opacity[.5],
    AbsoluteDashing[{5, 5}]],
   Directive[Black, Opacity[.5],
    AbsoluteDashing[{10, 10}]],
   Directive[Black, Opacity[.5],
    AbsoluteDashing[{0, 0}]]},
 PlotMarkers -> {Automatic, Medium},
 PlotLegends -> {0.3, 0.5, 0.8}]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you BoB. One more question is, based on your code, can I plot every 10th point on the x-axis? I have 240 data points. If I plot all of them together, it is too crowded. $\endgroup$ – David Xiaoyu Xu Jun 4 '16 at 8:46
  • $\begingroup$ @David, look up Span[] or Take[] for that. $\endgroup$ – J. M. is in limbo Jun 4 '16 at 9:10
  • $\begingroup$ @DavidXiaoyuXu - also look at Downsample $\endgroup$ – Bob Hanlon Jun 4 '16 at 13:19
-1
$\begingroup$

Sincerely David, it's not so difficult to look at the documentation

 Plot[{Sin[x], Cos[x]}, {x, 0, 2 \[Pi]}, 
 PlotStyle -> {Dashing[.1], Dashing[0.01]}]

Hope it will do the task

$\endgroup$
  • 1
    $\begingroup$ Sincerely Cyrille, the OP was asking about DiscretePlot[], so an answer involving that function would be certainly more germane. $\endgroup$ – J. M. is in limbo Jun 4 '16 at 6:57
  • $\begingroup$ I realize that I have not reading the question with enough attention. Sorry $\endgroup$ – cyrille.piatecki Jun 5 '16 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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