You can see that there are gaps on all sides of the plot between the frame and the extent of the line that I've plotted. How do I get rid of these? I'd like the frame to cover $[0,1]\times[0,1]$ and no more.
Plot[x, {x, 0, 1}, Frame -> True]
Plot[x, {x, 0, 1}, Frame -> True, PlotRangePadding -> 0]
The key to the solution was PlotRangePadding -> 0
.
Frame
. Thanks!
$\endgroup$
Commented
Jan 31, 2013 at 13:21
ContourPlot
; which version are you using, and is it with every plot or specific code? StreamPlot
does seem to leave some extra space so a negative padding value makes more sense there.
$\endgroup$
Commented
Apr 18, 2017 at 6:20
PlotRange
as inPlot[x, {x, 0, 1}, Frame -> True, PlotRange -> {{0, 1}, {0, 1}}]
. $\endgroup$