4
$\begingroup$

It is possible to make a dotted ListPlot. For example:

x = Range[0, 1, 0.0001];
y = Sin[x];
ListPlot[Transpose[{x, y}], PlotRange -> All, Joined -> True, PlotStyle -> Dotted]

Dotted

Is it possible to modify the frequency (i.e., spacing) of dotting?

$\endgroup$
3
11
$\begingroup$

It is indeed. As the documentation states, Dotted is equivalent to Dashing[{0, Small}]:

So for example

x = Range[0, 1, 0.0001];
y = Sin[x];
Table[ListPlot[Transpose[{x, y}], PlotRange -> All, Joined -> True, 
 PlotStyle -> Dashing[{0, d}]], {d, 0.01, 0.1, 0.01}]

Mathematica graphics

$\endgroup$
8
$\begingroup$
x = Range[0, 2 Pi, 0.01];
y = Sin[x];
Framed@
  ListPlot[(Transpose[{x, y + #}]) & /@ #, 
    PlotRange -> All, 
    Joined -> True, 
    PlotStyle -> (AbsoluteDashing[{#, 15 - #}] & /@ #), 
    Axes -> {False, True}] &@{3, 8, 12}

enter image description here

$\endgroup$

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.