Skip to content

Flat line plot gets wrong y-axis tick mark #2348

@to-mi

Description

@to-mi

Drawing a plot with flat y values gives wrong tick mark for y axis.

Example:

Plot.plot({
  marks: [
    Plot.line([
      {x: 0.0, y: 0.5},
      {x: 1.0, y: 0.5},
      {x: 2.0, y: 0.5},
      {x: 3.0, y: 0.5},
      {x: 4.0, y: 0.5},
      {x: 5.0, y: 0.5},
      {x: 6.0, y: 0.5},
      {x: 7.0, y: 0.5},
      {x: 8.0, y: 0.5},
      {x: 9.0, y: 0.5}
    ], {x: "x", y: "y", tip: "xy"})
  ]
})

Result has tick mark 1 at the level of the line. The tip shows correctly 0.5. (Same example with y-values at 1.5 seems to give 2 as tick mark.)

Image

(Tried to browse through the issues to see if this has been reported already but didn't find matching ossie.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions