3

Is there any way to get the format of the plot shown below for our own functiosn. For example, (x-3)^2+1 in [0,5].

I mean, how can we make a plot that looks same as the below plot. Especially, we would like arrow heads on the tips of the axes, grid lines that emulate plotting paper, and ticks on the frame, because we like the style of the plot shown.

enter image description here

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Unbelievable
  • 4,847
  • 1
  • 20
  • 46

1 Answers1

6

Here is a quick and simple approximation to what you ask for.

Plot[(x - 3)^2 + 1, {x, 0, 5},
  Axes -> None,
  Frame -> True,
  FrameTicks -> All,
  GridLines -> Automatic,
  PlotRangePadding -> {{.5, .5}, {2, 1.5}},
  Epilog -> {Arrow[{{-.25, 0}, {5.25, 0}}], Arrow[{{0, -.25}, {0, 11}}]},
  ImageSize -> 450]

simple

Here is a better approximation that requires a fair bit of fooling around with the grid lines.

Plot[(x - 3)^2 + 1, {x, 0, 5},
  Axes -> None,
  Frame -> True,
  FrameTicks -> All,
  GridLines ->
    {If[IntegerQ[#], {#, Black}, {#, Thin}] & /@ Range[-1, 6, 1/5], 
     If[EvenQ[#], {#, Black}, {#, Thin}] & /@ Range[-1, 11, 1/2]},
  PlotRangePadding -> {{.5, .5}, {2, 1.5}},
  Epilog -> {Arrow[{{-.25, 0}, {5.25, 0}}], Arrow[{{0, -.25}, {0, 11}}]},
  ImageSize -> 450]

better

m_goldberg
  • 107,779
  • 16
  • 103
  • 257