0

I am looking to discover a way to make a plot similar to this one. enter image description here

I found Gridlines of a framed plot with a background cannot be white?

But I cannot figure out how to turn off the axes lines but keep the axes labels? Here is some example code and I cannot figure out how to turn the framelabels back int black without turning the frame into black?

linewidth = .01; Imsize = 500;
SetOptions[Plot, 
  BaseStyle -> {FontFamily -> "Helvetica", FontSize -> 18}, 
  ImageSize -> Imsize];    
ttt = Plot[Sin[t], {t, -20, 20}, 
        PlotStyle -> {Red, Thickness[linewidth]}, Frame -> False, 
        FrameLabel -> {"d [mm]", "h [mm]"}, ImageSize -> Imsize,   
        AspectRatio -> Full][[1]];
    Plot[Sin[t], {t, -20, 20}, PlotStyle -> {Red, Thickness[linewidth]}, 
     Frame -> False, FrameLabel -> {"d [mm]", "h [mm]"}, 
     Method -> {"GridLinesInFront" -> True}, GridLines -> Automatic, 
     GridLinesStyle -> Directive[AbsoluteThickness[2], White], 
     AxesStyle -> {{White}, {White}}, LabelStyle -> Black, 
     ImageSize -> Imsize,   AspectRatio -> Full, 
     Prolog -> {{LightGray, Opacity[0.2], 
        Rectangle[Scaled[{.02, 0.02}], Scaled[{1, 1}]]}}, Epilog -> ttt]

As you can see from this example the actual axes labels are white and not visible!

enter image description here

DrKwantum
  • 61
  • 3

1 Answers1

1

Edit 2

pl = Plot[Sin[x], {x, 0, 2 Pi},
    PlotStyle -> {
      Red,
      Thickness[0.03]
      }
    ][[1]];
Plot[Sin[x], {x, 0, 2 Pi},
 PlotStyle -> None,
 Frame -> True,
 FrameTicksStyle ->
  Directive[11, Opacity[0], FontOpacity -> 13, 
   FontFamily -> "Zapfino", Darker@Green],
 FrameLabel ->
  {
   Style["x", 23, FontFamily -> "Chalkduster", Black, Bold],
   Style["sin(x)", 23, FontFamily -> "Chalkduster", Black, Bold]
   },
 Method -> {"GridLinesInFront" -> True},
 GridLines -> Automatic, 
 GridLinesStyle -> Directive[AbsoluteThickness[2], White],
 Prolog -> {{LightGray, Opacity[0.5], 
    Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}},
 Epilog -> pl]

p

Edit 1

pl = Plot[Sin[x], {x, 0, 2 Pi}, 
    TicksStyle -> Directive[11, Opacity[0], FontOpacity -> 0.01]][[1]];
Plot[Sin[x], {x, 0, 2 Pi},
 PlotStyle -> None,
 Frame -> True,
 FrameTicksStyle -> Directive[11, Opacity[0], FontOpacity -> 1],
 FrameLabel -> {
   Style["x", 23, FontFamily -> "Chalkduster", Black, Bold],
   Style["sin(x)", 23, FontFamily -> "Chalkduster", Black, Bold]
   },
 Method -> {"GridLinesInFront" -> True},
 GridLines -> Automatic, 
 GridLinesStyle -> Directive[AbsoluteThickness[2], White], 
 Prolog -> {{LightGray, Opacity[0.5], 
    Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}},
 Epilog -> pl]

plot

Original

If I understand correctly

pl = Plot[Sin[x], {x, 0, 2 Pi}, AxesLabel -> {"x", "sin(x)"}][[1]];
Plot[Sin[x], {x, 0, 2 Pi},
 PlotStyle -> None,
 Frame -> True,
 FrameLabel ->
  {Style["x", 23, FontFamily -> "Chalkduster", Black, Bold], 
   Style["sin(x)", 23, FontFamily -> "Chalkduster", Black, Bold]},
 Method -> {"GridLinesInFront" -> True},
 GridLines -> Automatic,
 GridLinesStyle -> Directive[AbsoluteThickness[2], White], 
 Prolog -> {{LightGray, Opacity[0.5], 
    Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}},
 Epilog -> pl]

Blockquote

bmf
  • 15,157
  • 2
  • 26
  • 63