lavavu / LavaVu

Lightweight, Automatable Visualisation & Analysis Viewing Utility
Other
53 stars 12 forks source link

Strange behaviour at zoom=0.5 #97

Closed rsbyrne closed 2 years ago

rsbyrne commented 2 years ago

Hi there,

Take the below snippet with zoom(0.5000001) and compare it to what you get with zoom(0.50000001).

Seems to be some special behaviour going on as you approach zoom 0.5. Might be worth a look?

-R

import lavavu

data = whatever

lv = lavavu.Viewer()
lv["background"] = "black" #Set the plot background colour
lv["axis"] = False
lv["border"] = False
points = lv.points(pointsize=5, pointtype="shiny", opacity=1.)
cmap = points.colourmap(lavavu.cubehelix(samples=32, rot=3)[4:-4]) #, range=[0,0.1])
points.vertices(data)
points.values(range(len(data.T)))

def displaydata():
    lv.reload()
    lv.display(resolution=(600,600))

lv.fov(90)
lv.zoom(0.5000001)

displaydata()
OKaluza commented 2 years ago

Thanks for the report Rohan, I'm still trying to work this one out, it's really strange.

OKaluza commented 2 years ago

Aha, found it, damn edge cases