# hline(0) not in correction position when plotting with object model

See original GitHub issuevline(0) appears in the right place, but hline(0) does not. hline(0) seems to always be positioned at the minimum y value on the axis, rather than at y=0.

```
from bqplot import *
from bqplot.pyplot import vline, hline
import numpy as np
np.random.seed(3)
x_data = np.random.randn(1, 10)[0] + 1
y_data = np.random.randn(1, 10)[0] + 1
sc_x = LinearScale()
sc_y = LinearScale()
scales_dict = {'x': sc_x, 'y': sc_y}
scatt = Scatter(x=x_data, y=y_data, scales=scales_dict)
ax_x = Axis(scale=sc_x, label='x')
ax_y = Axis(scale=sc_y, orientation='vertical', label='y')
vline_mark = vline(0, scales = scales_dict)
hline_mark = hline(0, scales = scales_dict)
fig = Figure(marks=[scatt, vline_mark, hline_mark], axes=[ax_x, ax_y], animation_duration=1000)
display(fig)
```

When updating mark positions, vline behaves as expected but hline moves to new (but still incorrect position).

```
fig.marks[0].x = fig.marks[0].x - 2
fig.marks[0].y = fig.marks[0].y - 2
```

bqplot 0.11.0 IPython 7.0.1

### Issue Analytics

- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)

#### Top Results From Across the Web

hline(0) not in correction position when plotting with ... - GitHub

vline (0) appears in the right place, but hline(0) does not. hline(0) seems to always be positioned at the minimum y value on...

Read more >Trouble with hline indices not changing when running ...

I moved my yintercept values into the aes of the lines and it worked perfectly. Correct hlines and all my legends.

Read more >Syntax: PROC SGPLOT HLINE Statement - SAS Help Center

When DISCRETEOFFSET= and DATALABELPOS= are both specified, the DISCRETEOFFSET= option has no effect on the data labels. Only the plot is offset. ·...

Read more >Plot a Horizontal line in Matplotlib - GeeksforGeeks

Plotting a horizontal line is fairly simple, Using axhline() ... y: Position on Y axis to plot the line, It accepts integers.

Read more >A ggplot2 Tutorial for Beautiful Plotting in R - Cédric Scherer

But this data could be also visualized as a line plot (not optimal, ... adjust the position of the text afterwards horizontally (0...

Read more >#### Top Related Medium Post

No results found

#### Top Related StackOverflow Question

No results found

#### Troubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.

Start Free#### Top Related Reddit Thread

No results found

#### Top Related Hackernoon Post

No results found

#### Top Related Tweet

No results found

#### Top Related Dev.to Post

No results found

#### Top Related Hashnode Post

No results found

## Top GitHub Comments

I suppose, yes. Maybe you would need to create a

`Line`

mark that has its own`x`

and`y`

scales?I tried to find a work around. The hline_mark.y value seems to be a fraction of the height in y. You would have to add the min + max to the scale. Its not quite right but its quite close…