1
$\begingroup$

I have two functions x[t] and y[t] which are similar in trend. I want to plot them in the same figure but it is hard to distinguish them. What is the command to plot one of the function in dashed line.

Another question is how to plot the function x[t] with different values of some parameter $\alpha$ in the same graph, as in the second figure? enter image description here

enter image description here

$\endgroup$

closed as off-topic by Bob Hanlon, Roman, MarcoB, Carl Lange, Henrik Schumacher May 9 at 9:39

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." – Bob Hanlon, Roman, MarcoB, Henrik Schumacher
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Dashed line can be plotted by adding option PlotStyle->Dashed. But I doubt here a dashed line would make any difference. A better choice would be plotting the difference of the two functions. $\endgroup$ – L.Yu May 6 at 3:18
  • 4
    $\begingroup$ (1) People here generally like users to post code as Mathematica code instead of just images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this meta Q&A helpful. (2) Search for Table in the documentation page for Plot and follow the example (the last example of the "Basic Examples"). $\endgroup$ – Michael E2 May 6 at 10:33
  • $\begingroup$ Another possibility: plot the Log of the functions so you can see the differences more clearly. $\endgroup$ – bill s May 6 at 15:39
2
$\begingroup$

The ranges of the functions involved are disparate by orders of magnitude, which makes them hared to plot on one chart. Here is the best I can do without spending hours tinkering with the plots.

x[a_][t_] := MittagLefflerE[a, t^a] + MittagLefflerE[a, 3 t^a]
y[a_][t_] := -MittagLefflerE[a, t^a] + MittagLefflerE[a, 3 t^a]

Plotting th difference between x[a][t] - y[a][t] as suggested by L. Yu.

diffXY[a_][t_] := 2 MittagLefflerE[a, t^a]
Plot[
  Evaluate[
    Callout[diffXY[#][t], Row[{"a = ", #}], After] & /@ Range[.2, 1., .2]], {t, 0, 2.5},
  PlotRange -> All,
  Frame -> True,
  FrameLabel -> {t, HoldForm[x[t] - y[t]]}, 
  ImageSize -> Large]

diff_plot

Plotting x[a][t] on a double-log-linear plot.

Plot[
  Evaluate[
    Callout[x[#][t], Row[{"a = ", #}], After] & /@ Range[.2, 1., .2]], {t, 0, 2.5},
  PlotRange -> Automatic,
  AspectRatio -> 1.25,
  ScalingFunctions -> {Log@*Log, Exp@*Exp},
  Frame -> True,
  FrameLabel -> {t, HoldForm[x[t]]},
  ImageSize -> Large]

x_plot

$\endgroup$

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