1
$\begingroup$

I am trying to add a title with a background color to my plot. Currently, using Framed inside PlotLabel only creates a box around the text itself.

I want the background box of the title to:

  1. Span the full width of the plot frame (match the width of the top axis).
  2. Sit perfectly on top of the frame without gaps (flush with the top axis).

Is there a way to achieve this using PlotLabel, or should I use Epilog with Scaled coordinates?

Thanks!

RegionPlot[y^3 < x^2 + x, {x, -2, 2}, {y, -2, 2}, PlotLabel -> Style[Framed[y^3 < x^2 + x], 16, Blue, Background -> Lighter[Yellow]]] 

enter image description here

$\endgroup$
1
  • $\begingroup$ Leading and trailing spaces? $\endgroup$ Commented Nov 18 at 3:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.