Group Abstract Group Abstract

Message Boards Message Boards

0
|
4K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Manipulate - Need some help ?

Posted 10 years ago

Dear All,

I am struggeling to make a Manipulate slider for the x-asis PlotRange.

Please can you help ? See file attached.

Thanks,....Jos

Manipulate[ListPlot[
  {AllYears06, AllYears07, AllYears08, AllYears09, AllYears10, 
   AllYears11, AllYears12, AllYears13, AllYears14}
  , Joined -> True
  , PlotLabel -> Style["TEST"]
  , BaseStyle -> {FontFamily -> "Helvetica", FontSize -> 9}
  , LabelStyle -> {10, "Helvetica", Black}
  , PlotMarkers -> {Automatic, 1}
  , PlotLegends -> Placed[
    {"2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", 
     "2014"}, Right]
  , GridLines -> {{{1, {Black, Thick, DotDashed}}, 2, 3, 4, 5, 6, 7, 
     8, 9, 10, 11, {12, {Black, Thick, DotDashed}}}, Automatic}
  , GridLinesStyle -> Directive[Black, Dotted]
  , FrameTicks -> {{Automatic, 
     Automatic}, {{{0, "."}, {1, "Jan"}, {2, "Feb"}, {3, "Mar"}, {4, 
       "Apr"}, {5, "May"}, {6, "Jun"}, {7, "Jul"}, {8, "Aug"}, {9, 
       "Sep"}, {10, "Okt"}, {11, "Nov"}, {12, "Dec"}}, Automatic}}
  , PlotRange -> {{0, 13}, {20, 70}}
  , Background -> GrayLevel[.9]
  , ImageMargins -> 1
  , FrameLabel -> {Month, Procent}
  , Frame -> True
  , InterpolationOrder -> 2
  ,
  PlotStyle ->
   {If[MemberQ[Years, 2006], {Red, Dashed}, None], 
    If[MemberQ[Years, 2007], Automatic, None],
    If[MemberQ[Years, 2008], Purple, None],
    If[MemberQ[Years, 2009], Black, None],
    If[MemberQ[Years, 2010], Blue, None],
    If[MemberQ[Years, 2011], Gray, None],
    If[MemberQ[Years, 2012], Yellow, None],
    If[MemberQ[Years, 2013], Green, None],
    If[MemberQ[Years, 2014], Red, None]
    }],
 Row[{CheckboxBar[
    Dynamic[Years], {2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 
     2014}]}]]
Attachments:
POSTED BY: Jos Klaps
2 Replies

Hi Sean,

Thanks for your quick reply and help.

  1. Yes, the code must be made much simple, but this is my last step, I want to see first if the code works.

  2. I hace tried several options but my problem was the combination of slider and checkbox, which don't shown in my code.

  3. Thanks, I was not aware of the IntervalSlider function, this should help me to find a solution.

Again, thanks for your excellent support,......Jos

POSTED BY: Jos Klaps

The first step to tackling a problem like this is to reduce your code to the simplest possible example. Have you tried creating the slider you mention in the notebook? I only see a check boxes to select the curves you want to see. These curves and the check boxes are tangential to your problem.

I think you want to use an IntervalSlider. Please see the documentation for IntervalSlider. Especially look at the example under the "Applications" section. Is this the kind of thing you want to do? If so, please try making a simple Manipulate using an IntervalSlider. Can you add this example to your own code at all?

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard