5
$\begingroup$

In regionplot, How to remove this white background for text?

enter image description here

 RegionPlot[{q > (\[Phi] \[Mu] c^2)/0.5}, {c, 0, 1}, {q, 0, 1}, 
  FrameLabel -> {"c", "q"}, 
  PlotLabels -> 
   Placed[{Style["L1", 50, Background -> None]}, Center]], {{\[Mu], 
   0.7}, 0.01, 1}, {{\[Phi], 0.3}, 0, 0.5}]```
$\endgroup$
3
  • $\begingroup$ Manipulate[RegionPlot[{q > (\[Phi] \[Mu] c^2)/0.5}, {c, 0, 1}, {q, 0, 1}, FrameLabel -> {"c", "q"}, Epilog -> Text[Style["L1", 50], {.5, .55}]], {{\[Mu], 0.7}, 0.01, 1}, {{\[Phi], 0.3}, 0, 0.5}] $\endgroup$
    – Bob Hanlon
    Oct 20, 2023 at 2:21
  • $\begingroup$ But I want placed label automaticly. $\endgroup$ Oct 20, 2023 at 2:36
  • 3
    $\begingroup$ Try using Placed[Style["L1", 50], Center, Background -> None] $\endgroup$
    – Carl Woll
    Oct 20, 2023 at 15:17

3 Answers 3

1
$\begingroup$

The simplest one is to use:

Background -> Transparent

And the Job Done.

$\endgroup$
1
  • 2
    $\begingroup$ @kglr - As shown in Carl Woll's comment at the top, the option Background -> Transparent or Background -> None needs to be used in Placed rather than in Style. Alternatively, Background -> Transparent can be put at the RegionPlot level. $\endgroup$
    – Bob Hanlon
    Oct 20, 2023 at 16:39
3
$\begingroup$
Manipulate[
 ReplaceAll[f_Framed :> Insert[f, Background -> Opacity[0], 2]] @
  RegionPlot[{q > (ϕ μ c^2)/0.5}, {c, 0, 1}, {q, 0, 1}, 
   FrameLabel -> {"c", "q"}, 
   PlotLabels -> Placed[{Style["L1", 50]}, Center]], 
 {{μ, 0.7}, 0.01, 1}, 
 {{ϕ, 0.3}, 0, 0.5}]

enter image description here

$\endgroup$
2
$\begingroup$
$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global`*"]

Manipulate[
 RegionPlot[{q > (ϕ μ c^2)/0.5},
   {c, 0, 1}, {q, 0, 1},
   FrameLabel -> {"c", "q"},
   PlotLabels -> Placed[
     Style["L1", 50],
     Center]] /. _Pane?(Not[FreeQ[#, "L1"]] &) :>
   Style["L1", 50],
 {{μ, 0.7}, 0.01, 1, 0.01, Appearance -> "Labeled"},
 {{ϕ, 0.3}, 0, 0.5, 0.005, Appearance -> "Labeled"},
 SynchronousUpdating -> False,
 TrackedSymbols :> {μ, ϕ}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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