Add a Second X or Y Axis



    PLOT SCATTER
        X,RED FILLED CIRCLE
      WITH
        FONT "sanserif" plain 13
        TITLE "Boiling Points of the Elements"
        TITLE " "
        GRIDLINES
        TITLE Y "Degrees Fahrenheit"
        FORMAT Y DECIMAL "#.##\u00B0"
        SCALE Y -4000 12000 4000
        TITLE Y2 "Degrees Centigrade"
        FORMAT Y2 DECIMAL "#\u00B0"
        SCALE Y2 -2240 6649 2222.25
        TITLE X "Element Number"
      SELECT
        number, F
        FROM boiling;

Use SCALE Y2 to show a second y2 axis with a given scale. Beginning with version 1.4.12, you can also assign Y or Y2 axis scaling to a series by attaching the suffix “:Y” or “:Y2″ to one of the series types:

    PLOT SCATTER
        X,RED FILLED CIRCLE:Y2
        ...

Use NO LABELS and TICKS when you want the second axes to echo the first:


    PLOT SCATTER
        X,RED FILLED CIRCLE:y2
      WITH
        FONT "sanserif" plain 13
        TITLE "Boiling Points of the Elements"
        TITLE " "
        TITLE Y "Degrees Fahrenheit"
        FORMAT Y DECIMAL "#.##\u00B0"
        SCALE Y -4000 12000 4000
        SCALE Y2 -4000 12000 4000
        SCALE X 0 100 20
        SCALE X2 0 100 20
        TICKS X TOP
        TICKS Y RIGHT
        NO LABELS Y2
        TICKS Y2 LEFT
        NO LABELS X2
        TICKS X2 BOTTOM

        TITLE X "Element Number"
      SELECT
        number, F
        FROM boiling;

Comments are closed.