# Wrong annotation location of vrect on log graph

**URL:** <https://community.plotly.com/t/wrong-annotation-location-of-vrect-on-log-graph/58550>\
**Category:** Dash Python\
**Created:** [November 18, 2021, 1:39pm UTC](https://community.plotly.com/t/wrong-annotation-location-of-vrect-on-log-graph/58550 "2021-11-18T13:39:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sank95](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Sank95](https://community.plotly.com/u/Sank95)\
**Post date:** [November 18, 2021, 1:39pm UTC](https://community.plotly.com/t/wrong-annotation-location-of-vrect-on-log-graph/58550/1 "2021-11-18T13:39:12Z")

</div>

Good day, Guys. I have find an error related to the “vrect” component on graph with log axes .

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/c/6/c67ea2631841668c9508159aff7ea2c92a081901.png)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/9/a/9abdf5ed4657b0b0c348eb89140fd982be8b2f31.png)

The pictures shows the error. The Annotation shifted on ~10^2000. Vrect was showed correct.

You can see code of vrect below. The annotation is not attached to vrect

```auto
fig.add_vrect(
    x0=row['BSTART'], 
    x1=row['BEND'], 
    annotation_text=row['nam'], 
    annotation_position="top right",
    fillcolor=row['color'], 
    opacity=0.3, 
    line_width=0
)

```

Here is another example

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/2/d/2d5896a1942c3308eaab009b3a4bee7a29b05787.png)

---

<div class="post-metadata">

**Author:** ![Sank95](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Sank95](https://community.plotly.com/u/Sank95)\
**Post date:** [January 18, 2022, 9:32am UTC](https://community.plotly.com/t/wrong-annotation-location-of-vrect-on-log-graph/58550/2 "2022-01-18T09:32:07Z")

</div>

Any ideas how to fix it?

---

<div class="post-metadata">

**Author:** ![darynw](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@darynw](https://community.plotly.com/u/darynw)\
**Post date:** [January 18, 2022, 5:55pm UTC](https://community.plotly.com/t/wrong-annotation-location-of-vrect-on-log-graph/58550/3 "2022-01-18T17:55:08Z")

</div>

I don’t know if you have found a fix, but I had to follow the fixes found here:  
[https://github.com/plotly/plotly.js/issues/1258](https://github.com/plotly/plotly.js/issues/1258)

I had to do something like this to the coordinates of an annotation.

```python
x=math.log10(val), y=math.log10(val)

```
