!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!                                                                      !
! GLE - Graphics Layout Engine <http://www.gle-graphics.org/>          !
!                                                                      !
! Modified BSD License                                                 !
!                                                                      !
! Copyright (C) 2009 GLE.                                              !
!                                                                      !
! Redistribution and use in source and binary forms, with or without   !
! modification, are permitted provided that the following conditions   !
! are met:                                                             !
!                                                                      !
!    1. Redistributions of source code must retain the above copyright !
! notice, this list of conditions and the following disclaimer.        !
!                                                                      !
!    2. Redistributions in binary form must reproduce the above        !
! copyright notice, this list of conditions and the following          !
! disclaimer in the documentation and/or other materials provided with !
! the distribution.                                                    !
!                                                                      !
!    3. The name of the author may not be used to endorse or promote   !
! products derived from this software without specific prior written   !
! permission.                                                          !
!                                                                      !
! THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR   !
! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED       !
! WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   !
! ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY       !
! DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL   !
! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE    !
! GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS        !
! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER !
! IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR      !
! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN  !
! IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                        !
!                                                                      !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

size 15.0 3.9

include "../../script/manual.gle"
mh = 0.3
manual_graph_mode

gw = 4.7
dy = 2.5

begin object g0
   begin graph
      size gw 0.01
      yaxis off
      xaxis log min 1 max 100
      x2axis off
      xticks length -0.3
   end graph
end object

begin object g1
   begin graph
      size gw 0.01
      yaxis off
      xaxis log min 1 max 100
      x2axis off
      xticks length -0.3
      xlabels log off
   end graph
end object

begin object g2
   begin graph
      size gw 0.01
      yaxis off
      xaxis log min 1 max 100
      x2axis off
      xticks length -0.3
      xsubticks off
   end graph
end object

amove 0.1 pageheight()-dy
draw g1.tl

amove ptx(g1.rc)+0.4 pageheight()-dy
draw g2.tl

amove ptx(g1.rc)+0.3 pageheight()-0.1
draw g0.tc

sub arrow_line_label p1$ p2$ dis lab$ dx
    local x0 = ptx(p1$)
    local y0 = pty(p1$)
    local x1 = ptx(p2$)
    local y1 = pty(p2$)
    amove (1-dis)*x0+dis*x1 (1-dis)*y0+dis*y1
    aline dis*x0+(1-dis)*x1 dis*y0+(1-dis)*y1 arrow end
    set just center
    amove (x0+x1)/2+dx (y0+y1)/2
    begin box fill white nobox add 0.05
       tex lab$
    end box
end sub

arrow_line_label "g0.bc" "g1.tc" 0.1 "add `xlabels log off'" -0.75
arrow_line_label "g0.bc" "g2.tc" 0.1 "add `xsubticks off'" +0.75

amove ptx(g2.bc) pty(g2.bc)-0.5
tex "also turns off sublabels"

gw = 4

begin object g0b
   begin graph
      size gw 0.01
      yaxis off
      xaxis log min 1 max 100
      x2axis off
      xticks length -0.3
   end graph
end object

begin object g1b
   begin graph
      size gw 0.01
      yaxis off
      xaxis log min 1 max 100
      x2axis off
      xticks length -0.3
      xsubticks on
   end graph
end object

begin object g2b
   begin graph
      size gw 0.01
      yaxis off
      xaxis log min 1 max 100
      x2axis off
      xticks length -0.3
      xlabels log l25
   end graph
end object

amove ptx(g2.rc)+0.5 pageheight()-dy
draw g1b.tl

amove ptx(g1b.rc)+0.4 pageheight()-dy
draw g2b.tl

amove ptx(g1b.rc)+0.3 pageheight()-0.1
draw g0b.tc

arrow_line_label "g0b.bc" "g1b.tc" 0.1 "add `xsubticks on'" -0.75
arrow_line_label "g0b.bc" "g2b.tc" 0.1 "add `xlabels log l25'" +0.75

amove ptx(g2b.bc) pty(g2b.bc)-0.5
tex "also turns on subticks"
