# How to plot ~10 billion datapoint time series efficiently?

**URL:** <https://discourse.julialang.org/t/how-to-plot-10-billion-datapoint-time-series-efficiently/81228>\
**Category:** Visualization\
**Tags:** question, plotting, diffeq\
**Created:** [May 18, 2022, 1:09am UTC](https://discourse.julialang.org/t/how-to-plot-10-billion-datapoint-time-series-efficiently/81228 "2022-05-18T01:09:30Z")\
**Posts on this page:** 1\
**Showing post:** 42

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [May 20, 2022, 2:52pm UTC](https://discourse.julialang.org/t/how-to-plot-10-billion-datapoint-time-series-efficiently/81228/42 "2022-05-20T14:52:05Z")

</div>

Guys, those [Douglas-Peucker](https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm) guys (sorry Ramer, I didn’t know about you) have worked on this

```julia
using GMT

x = LinRange(0,2π, 10_000);
y = @. 2x * sin(x)^2 + 4x * cos(2x)^4;
xy = gmtsimplify([x y], tol=0.005);
imshow(xy, marker=:point, lw=0.5, figsize=(12,12), title="Douglas-Peucker ($(size(xy,1)) points)")

```

 ![GMTjl_tmp](https://global.discourse-cdn.com/julialang/original/3X/9/f/9f856b475bb4e26074b130ed4c3fe643ecb9444b.png)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-plot-10-billion-datapoint-time-series-efficiently/81228)._
