0
$\begingroup$

For a no-color print book it can be complicated to find proper gray tones in a multi-function plot to distinguish the curves. One can use different types of gray or dashing, and to some degree it works well. I'm wondering if one could use the new MaterialShading in PlotStyle somehow. I'm thinking along the lines of perhaps a ton of tiny spheres in different metal colors, possibly with overlap. Maybe silvery tones, coppery tones, or texture materials (would have to experiment a lot with this) could provide good contrast when printed in b&w or grayscale.

I realize materials make only sense on 3d solids, but can we contort that somehow for line plots?

$\endgroup$
4
  • $\begingroup$ Would appropriately placed PlotLabels meet your needs? $\endgroup$
    – Bob Hanlon
    Commented Jun 16, 2021 at 15:44
  • $\begingroup$ You mean Callouts? I don't think so. On highly oscillatory functions that can demand a lot of "line following" of the reader and still be confusing. I well-chosen plot should tell a story that can be understood in second. I make some progress with Filling, Dashing, and Epilog, but my hope is (and at this point this is only a hope) that different materials may provide for better visual distinctions of the curves. $\endgroup$ Commented Jun 16, 2021 at 16:08
  • $\begingroup$ While they may not meet your immediate needs, note that PlotLabels (option) are distinct from Callout (wrapper). For example, Plot[Evaluate[Callout[#[[1]], #[[1]], {#[[2]], Above}, Background -> None] & /@ {{x, 1.45}, {x^2, 1.6}, {x^3, 1.75}}], {x, 0, 2}, PlotStyle -> {Automatic, Dashed, Dotted}, PlotLabels -> {x, x^2, x^3}] $\endgroup$
    – Bob Hanlon
    Commented Jun 16, 2021 at 16:32
  • $\begingroup$ I know. But PlotLabels make it even worse, the "line following" is even harder than with Callouts. I'm absolutely in love with Callouts, ever since they came out I pretty much don't use PlotLabels anymore. But it's still too much line following. Also, if there is a way to use Filling with a break specified by the independent variable (if x < 0.5, fill between f1 and f2, otherwise fill between f2 and f3), some sort of piecewise, that would also help me a lot. But I can only find an option for Filling to specify the level (y coordinate). $\endgroup$ Commented Jun 16, 2021 at 16:38

1 Answer 1

2
$\begingroup$
Clear["Global`*"]

In response to your comment, "Also, if there is a way to use Filling with a break specified by the independent variable (if x < 0.5, fill between f1 and f2, otherwise fill between f2 and f3), some sort of piecewise, that would also help me a lot. But I can only find an option for Filling to specify the level (y coordinate)"

f1[x_] := Sin[x];
f2[x_] := Cos[x];
f3[x_] := 2 Cos[x];

Initially fill to F1 then switch to f3

f4[x_] := Piecewise[{{f1[x], x < 0.5}}, f3[x]]

Plot[{f1[x], f2[x], f3[x], f4[x]}, {x, 0, 1},
 PlotStyle -> {Dashed, Thick, DotDashed, None},
 Filling -> {4 -> {{2}, {
      Opacity[0.2, ColorData[97][1]],
      Opacity[0.2, ColorData[97][3]]}}}, PlotLegends -> "Expressions"]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you, this looks great. Still waiting before I will accept. $\endgroup$ Commented Jun 16, 2021 at 18:06

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