# Plot disappearing

**URL:** <https://discourse.vtk.org/t/plot-disappearing/2676>\
**Category:** Development\
**Created:** [February 21, 2020, 8:52pm UTC](https://discourse.vtk.org/t/plot-disappearing/2676 "2020-02-21T20:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snip777](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/58f4c7/32.png) [@snip777](https://discourse.vtk.org/u/snip777)\
**Post date:** [February 21, 2020, 8:52pm UTC](https://discourse.vtk.org/t/plot-disappearing/2676/1 "2020-02-21T20:52:33Z")

</div>

I wrote custom plot which derives from vtkPlot and added it to vtkChartXY.  
When i zoomin at some point the plot just disappears.  
I looked at vtk sources and found that the problem originates in function vtkChart::CalculatePlotTransform:

```
for (int i = 0; i < 2; ++i)
{
    if (fabs(log10(origin[i] / scale[i])) > 2)
    {
        /* the code here looks strange, when i got here the plot disappears */
        shift[i] = floor(log10(origin[i] / scale[i]) / 3.0) * 3.0;
        ^^^^^^^^
        shift[i] = -origin[i];
        ^^^^^^^^
    }
....
}
```
