3
$\begingroup$

I'm trying to format a plot so that there are no ticks or scale on either axis, but there is a label on each axis. I think AxisLabels are hard to read and would prefer to have the labels where FrameLabel puts them, but I can't remove the ticks without removing the frame (and as far as I can tell, you can't have a FrameLabel without a Frame). Here's my code.

ListPlot[data, PlotStyle -> Black, Ticks -> None, Frame -> True, 
 FrameLabel -> {"Time", "Cumulative adopters"}]

Is there any way to do this? Much appreciated!

$\endgroup$
6
$\begingroup$

Use FrameTicks if you specified Frame -> True

ListPlot[
 Range@10,
 PlotStyle -> Black,
 FrameTicks -> None,
 Frame -> True,
 FrameLabel -> {"Time", "Cumulative adopters"}]

enter image description here

Compare with

ListPlot[
 Range@10,
 PlotStyle -> Black,
 Ticks -> None,
 Frame -> False,
 AxesLabel -> {"Time", "Cumulative adopters"}]

enter image description here

The most important differences are

enter image description here

$\endgroup$
3
$\begingroup$

Supplementing eldo's answer, you can specify which frame lines are shown:

For Graphics, Plot, and related functions, Frame->{{left,right},{bottom,top}} specifies whether to draw a frame on each edge. With the default setting FrameTicks->Automatic, ticks are included whenever a frame is drawn.

ListPlot[
 Array[Sinc, 10, {0, 3 Pi}],
 Axes -> False,
 FrameTicks -> None,
 Frame -> {{True, False}, {True, False}},
 FrameLabel -> {"Time", "Cumulative adopters"}
]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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