7
$\begingroup$

For custom appearances IntervalSlider seems to clip on the right side:

IntervalSlider[
 Appearance -> {"ThumbAppearance" -> {Style["[", 18], None, 
     Style["1000", 18]}}]

enter image description here

I tried changing FrameMargins and other relevant options, but no luck. Any way to avoid that?

$\endgroup$
6
$\begingroup$

You can tweak underlying Graphics:

IntervalSlider[
   Appearance -> {"ThumbAppearance" -> {Style["[", 18], None, Style["1000", 18]}}
,  BaseStyle -> {
     GraphicsBoxOptions -> {
       PlotRangePadding -> {{.1, .1}, Automatic}
     }
   }
]

enter image description here

$\endgroup$
  • $\begingroup$ Great! Is there any way to keep the look of Appearance->"Paired" but tweak it, by say adding labels? $\endgroup$ – M.R. Jan 14 at 19:27
  • $\begingroup$ @M.R. I am not aware of any straightforward method except digging in definitions and trying to replace/insert labels where needed :/ $\endgroup$ – Kuba Jan 15 at 5:46
6
$\begingroup$

You can also wrap the interval slider object with Style and use DefaultOptions to set PlotRangePaddding option values:

s = IntervalSlider[Appearance -> 
    {"ThumbAppearance" -> {Style["[", 18], None, Style["1000", 18]}}]

Style[#, DefaultOptions ->
   {Graphics -> PlotRangePadding -> {{Automatic, .1}, Automatic}}] & @ s

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.