Menu

#1590 missing tic [0.1:1] in locscale

None
closed-fixed
nobody
None
2016-07-20
2015-04-10
Anonymous
No

Dear Gnuplot-developers,

when plotting an axis in logscale with range [0.1:1], the first tic-mark at 0.1 is not drawn.

Terminals: dumb, wxt, pdf-cairo, ...

Reproducer:

set log y
set yrange [0.1:1]
plot x

Output (reproducer with term dumb):

  1 +-+--------+---------+----------+-------+-+
    ++         +         + +        +        ++
    ++                    +         x +-----+++
    ++                    |                  ++
    |                     +                   |
    ++                    |                  ++
    ++                    |                  ++
    |                     |                   |
    ++                    +                  ++
    |                     |                   |
    ++                    |                  ++
    |                     |                   |
    |                    |                    |
    |                    |                    |
    +          +         +          +         +
    +----------+---------+----------+---------+
   -10        -5         0          5         10

The 0.1 tic in the lower left corner is missing.

Workaround:

set log y
set yrange [0.1:1]
set ytics 0.1    # 10 does not work
plot x

Output (workaround):

    1 +-+-------+---------+---------+-------+-+
      ++        +         + +       +        ++
      ++                   +        x +-----+++
      ++                   |                 ++
      |                    +                  |
      ++                   |                 ++
      ++                   |                 ++
      |                    |                  |
      ++                   +                 ++
      |                    |                  |
      ++                   |                 ++
      |                    |                  |
      |                   |                   |
      |                   |                   |
      +         +         +         +         +
  0.1 +-+-------+---------+---------+-------+-+
     -10       -5         0         5         10

An other workaround is to set the yrange min to e.g. 0.0999999999.

Versions: 5.0 patchlevel rc2 on Windows 8.1, 4.6 patchlevel 4 on Ubuntu Linux x86_64

Best regards,
a gnuplot fan

Discussion

  • Ethan Merritt

    Ethan Merritt - 2015-04-10

    Seems like it behaved that way at least as far back as version 4.0.

     
  • Hans-Bernhard Broeker

    • labels: logscale, tics -->
    • Group: -->
    • Priority: -->
     
  • Hans-Bernhard Broeker

    This appears to be a relatlively clean example of the old adage:
    In computing, 10 times 0.1 is hardly ever 1.0

     
  • Ethan Merritt

    Ethan Merritt - 2016-05-27
    • status: open --> pending-fixed
     
  • Ethan Merritt

    Ethan Merritt - 2016-05-27

    Fixed in 5.1 as a side-effect of reimplementing "set log" as a special case of "set nonlinear"

     
  • Ethan Merritt

    Ethan Merritt - 2016-07-20
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.