If all you need to do is make the gridlines look better, just change your plot command to have these options GridLines -> {Range[-4, 4, .5], Range[-32, 32, 4]},GridLinesStyle -> LightGray
. But if you want to fully reproduce that plot, see below.
Something like this is not an exact reproduction
Plot[{x, x^2, x^3}, {x, -4, 4},
PlotRange -> {-33, 33},
Frame -> True,
Ticks -> {LinTicks, LinTicks},
FrameTicks -> All,
FrameTicksStyle -> {{Black, Blue}, {Red, Green}},
GridLines -> {Range[-4, 4, .5], Range[-32, 32, 4]},
GridLinesStyle -> LightGray,
ImageSize -> 600,
FrameStyle -> ColorData[97][1],
AxesStyle -> Directive[ColorData[97][1], Arrowheads[0.03]]]

But man, would be nice if we could have tick marks on the axes as well as on the frame. According to this post this is impossible without using Overlay
(and I hate using Overlay
). There is a neat solution using extraAxisPlot
from this post
baseplot = Plot[{x, x^2, x^3}, {x, -4, 4},
PlotRange -> {-33, 33},
Frame -> True,
FrameTicks -> All,
FrameTicksStyle -> {{Black, Blue}, {Red, Green}},
GridLines -> {Range[-4, 4, .5], Range[-32, 32, 4]},
GridLinesStyle -> LightGray,
ImageSize -> 600,
FrameStyle -> ColorData[97][1],
Axes -> False];
extraAxisPlot[baseplot, {{-3.8, -30}, {3.8, 30}}, {-3.8, -30},
"AxisType" -> "Both",
"AxisOptions" -> {AxesStyle ->
Directive[ColorData[97][1], Arrowheads[0.03]],
LabelStyle -> {FontOpacity -> 0}}]

Edit As Nasser says it is hard to put the tick labels inside the frame - you have to use Heike's solution, but then that Epilog
will override the Epilog
that shows the axes so I need to give another option to extraAxisPlot
baseplot = Plot[{x, x^2, x^3}, {x, -4.2, 4.2},
PlotRange -> {-34, 34},
Frame -> True,
FrameTicks -> All,
FrameTicksStyle -> (FontOpacity -> 0),
GridLines -> {Range[-4, 4, .5], Range[-32, 32, 4]},
GridLinesStyle -> LightGray,
ImageSize -> 600,
FrameStyle -> ColorData[97][1],
Axes -> False];
Show[extraAxisPlot[baseplot, {{-3.8, -30}, {3.8, 30}}, {-3.8, -30},
"AxisType" -> "Both",
"AxisOptions" -> {AxesStyle ->
Directive[ColorData[97][1], Arrowheads[0.03]],
LabelStyle -> {FontOpacity -> 0}},
"ExtraEpilog" -> {Table[
Text[i, {i, -34}, {0, -1}, BaseStyle -> ColorData[97][1]], {i,
Range[-4, 4, 2]}],
Table[
Text[i, {i, 34}, {0, 1}, BaseStyle -> ColorData[97][1]], {i,
Range[-4, 4, 2]}],
Table[
Text[i, {-4.2, i}, {-.5, 0}, BaseStyle -> ColorData[97][1]], {i,
Range[-30, 30, 10]}],
Table[
Text[i, {4.2, i}, {.5, 0}, BaseStyle -> ColorData[97][1]], {i,
Range[-30, 30, 10]}]}]]

Range
to control the distance between gridlines and you can useGridLinesStyle
to control their appearance. $\endgroup$ – C. E. Jan 8 '16 at 7:56