# Strange things with plots, InspectDR

**URL:** <https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937>\
**Category:** General Usage\
**Tags:** question, plots, inspectdr\
**Created:** [July 18, 2017, 7:29pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937 "2017-07-18T19:29:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [July 18, 2017, 7:29pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937/1 "2017-07-18T19:29:47Z")

</div>

Hi.

I’m trying Plots.jl with several fast frameworks such as as GR and InspectDR.

When I run this code

```julia
using Plots
inspectdr()
plot(1:100,rand(100))

```

 ![](https://global.discourse-cdn.com/julialang/original/2X/9/924f5fdb13ae4c5ae7bb948be768c2ac37301391.png)

As you can see the Y-axis doesn’t show the numbers properly, in Chrome nor on Firexox.  
If I save the plot with savefig(“plot1.png”) then it works well.

And something more strange

Why is this code  
`scatter(1:10000,rand(10000))`

producing this plot?  
 ![](https://global.discourse-cdn.com/julialang/original/3X/3/b/3bcd9b831f3d84db4bee1eca6eaa69167c2deed6.png)

I mean, if I use scatter(1:100,rand(100)) instead then I get a plot with the dots well distributed but with higher numbers the dots accumulate on the top and the bottom.

I’m getting the same bad behaviour if I use the syntax  
`display(plot(1:10000, rand(10000), seriestype=:scatter))`

---

<div class="post-metadata">

**Author:** ![MA\_Laforge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma_laforge/32/385_2.png) [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Post date:** [July 19, 2017, 11:05pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937/2 "2017-07-19T23:05:44Z")

</div>

### Why do my numbers/labels not look right in Jupyter notebooks?

By default, InspectDR renders to SVG… but Jupyter does not appear to display SVGs correctly.

Therefore, you have to set the following variable:

```julia-auto
InspectDR.defaults.rendersvg=false

```

Alternatively (preferably), you can add the following to your ~/.juliarc file:

```julia-auto
DEFAULTS_INSPECTDR = Dict(
	:rendersvg => false,
)

```

---

<div class="post-metadata">

**Author:** ![MA\_Laforge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma_laforge/32/385_2.png) [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Post date:** [July 19, 2017, 11:08pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937/3 "2017-07-19T23:08:56Z")

</div>

### @Juan: Why is this code […] producing this plot?

That is very unfortunate - an oversight on my part.

InspectDR gets its speed on large datasets by dropping points that are not “visible”. Instead, it “draws a glitch” to visually indicate that the data is within some y-range (this is what “F1-acceleration” does).

This works well on line art… but not so much when all you draw are symbols.

You can work around this by setting the parameter `dataf1=false` when you “add” a dataset:

```julia-auto
add(plot::Plot2D, x::Vector, y::Vector; id::String="", dataf1=true, strip=1)

```

Unfortunately, this is not available from Plots.jl.

I will have to find a workaround - and might need to rethink when I can actually apply “F1-acceleration”.

I will keep you posted.

---

<div class="post-metadata">

**Author:** ![MA\_Laforge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ma_laforge/32/385_2.png) [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Post date:** [July 21, 2017, 2:14pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937/4 "2017-07-21T14:14:53Z")

</div>

### @Juan: Why is this code […] producing this plot?

I just tagged a new version of InspectDR: v0.2.3.

It adds a new setting called `:droppoints`. See section “Configuration/Defaults” section for more info: [https://github.com/ma-laforge/InspectDR.jl/tree/v0.2.3#Config\_Defaults](https://github.com/ma-laforge/InspectDR.jl/tree/v0.2.3#Config_Defaults)

In short, this setting inhibits “F1”-acceleration, depending on how a trace is drawn. By default, InspectDR will _ **no longer apply** _ “F1”-acceleration when data is displayed with glyphs (or markers - in Plots.jl-speak).

The unfortunate result of this change is that rendering of plots will be significantly slower for large datasets that are plotted with markers.

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [July 21, 2017, 9:48pm UTC](https://discourse.julialang.org/t/strange-things-with-plots-inspectdr/4937/5 "2017-07-21T21:48:23Z")

</div>

Thanks,  
I’ve added

```julia
DEFAULTS_INSPECTDR = Dict(
	:rendersvg => false,
	:droppoints => :never,
	)

```

to my juliarc.jl and now it works as expected.  
And I think it’s still fast.  
I need to compare it to other packages such as GR
