3
$\begingroup$

Is there a way to add labels to a 2D plot, without the Frame ? Here's a MWE which shows a simple graph with four labels around its frame. I need to remove the frame, but keep the labels. Is that possible ?

ParametricPlot[
    {t, t^2}, {t, -4, 4},
    PlotRange -> {{-4, 4}, {-4, 4}},
    AspectRatio -> 1,
    Frame -> True,
    FrameLabel -> {
        Style["a", 16, Italic],
        Style["b", 16, Italic],
        Style["c", 16, Italic],
        Style["d", 16, Italic]
    }
]
$\endgroup$
4
$\begingroup$

You can use

FrameStyle -> Directive[Opacity @ 0, FontOpacity -> 1], 
FrameTicks -> None, ...

enter image description here

But in general I'd go with Labeled.

$\endgroup$
  • $\begingroup$ How would you use Labeled in this case ? $\endgroup$ – Cham Apr 22 '16 at 13:56
  • $\begingroup$ @Cham What exactly triggered that question? Examples in documentation seem to be straightforward. Although I could've missed something specific to this case. $\endgroup$ – Kuba Apr 22 '16 at 14:07
  • 1
    $\begingroup$ You can use Transparent, too. $\endgroup$ – J. M. will be back soon Apr 22 '16 at 14:09
  • $\begingroup$ Actually, I need to add labels to the four corners of a square losange. The frame labels positions are just right, this is why I was trying with this option. $\endgroup$ – Cham Apr 22 '16 at 14:10
  • 3
    $\begingroup$ @Cham Labeled[ ArrayPlot[DiamondMatrix[5], Frame -> None], {a, b, c, d}, {Top, Right, Bottom, Left} ]? $\endgroup$ – Kuba Apr 22 '16 at 14:40

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.