X axis is shifted to the right when you zoom in

Bug #1200632 reported by Henry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
quickplot (Ubuntu)
New
Undecided
Unassigned

Bug Description

For any kind of data, if you try to zoom in too much, the x axis ends up being shifted significantly to the right (beyond the end of the data). This problem happens even with Quickplot version 0.10.4.

To reproduce, create a file with the following contents:

1 1
2 2
3 3
4 4

Plot it and try to zoom around one of the points very closely so that the zoom box is barely outside the point.

Revision history for this message
Lance Arsenault (lance-arsenault) wrote :

Hi,

I'm the sole upstream developer of quickplot. Lance.

I'd like to fix this bug, but I'm having trouble understanding what the bug is, and how to see it.

The way I see it, quickplot does not draw any axises. Quickplot draws a grid of x and y lines. Grid lines are labeled at even intervals. When you drag the graph (with the left mouse button pressed move the pointer) you can see grid labels spaced at a little less than the distance of the current veiw port size. These grid labels are recalculated for every zoom level, so they "jump" around a lot when you zoom. The label positions are regular, but not super nice every time. It's kind of like the regular latitude and latitude labels on a paper map. It's just a regular periodic pattern. The labels may end up in a stupid location, but it is not supposed to be giving wrong information.

An easy way to plot your test data is with this one-liner:

           echo -e "1 1\n2 2\n 3 3\n 4 4" | quickplot -

Can you show me a snapshot as a png file of this bug behavior? Or did I just resolve this bug by explaining what you are seeing? Or can this evolve into a Quickplot feature request (granted I don't understand it)?

--lance

Revision history for this message
Brent Roman (brentr) wrote :
Download full text (5.5 KiB)

Lance,

This bug seems to occur when the X-axis (first column) contains large values.

These data do not display at all:

time,pitch (degree),roll (degree),depth
1559245764.00,-3.9353654384613,6.67214441299438,0.243953543210028
1559245766.00,-0.330003321170807,4.06886768341064,0.353055504063683
1559245768.00,-1.90330624580383,6.67894172668457,0.371797847748353
1559245770.00,-7.83213710784912,3.62915658950806,0.253701153105323
1559245772.00,-3.61825370788574,-0.0809656530618668,0.255412587849288
1559245774.00,0.637735843658447,4.22454881668091,0.266509104424275
1559245776.00,-2.2054443359375,4.35870885848999,0.275753144281817
1559245778.00,-1.5074155330658,5.8386607170105,0.272834014170026
1559245780.00,-0.846648573875427,0.189283519983292,0.285850225830712
1559245782.00,-4.8403172492981,5.42889881134033,0.224504248496948
1559245784.00,-5.56000137329102,4.10268592834473,0.2912015270515
1559245786.00,-0.251207947731018,-2.60144400596619,0.225260836480686
1559245788.00,-2.81213164329529,7.42689800262451,0.22720682887724
1559245790.00,-1.84972643852234,1.12259078025818,0.277530750268431
1559245792.00,-1.126091837883,4.02948093414307,0.243176157335612
1559245794.00,-1.55595779418945,2.57466530799866,0.241637534810342
1559245796.00,-1.23133766651154,6.41764783859253,0.288629135590001
1559245798.00,-2.60550117492676,3.07119536399841,0.276906545311058
1559245800.00,-0.987749576568604,3.5232036113739,0.306081219458631
1559245802.00,0.224536225199699,1.65546321868896,0.253745014633278
1559245804.00,-5.40355110168457,-0.783964991569519,0.230393251535622
1559245806.00,2.5057897567749,8.34267139434814,0.356737981104309
1559245808.00,-1.14007198810577,3.07535719871521,0.525036520243447
1559245810.00,-6.2310643196106,2.01219868659973,0.47070914878097
1559245812.00,-3.11489152908325,6.73777723312378,0.24352894468232
1559245814.00,-4.85607385635376,-1.1636551618576,0.227257196213644
1559245816.00,-3.99073672294617,3.11237859725952,0.319460056062971
1559245818.00,-11.7779245376587,2.89610457420349,0.38593813187931
1559245820.00,-15.096248626709,3.22468185424805,0.324848561298921
1559245822.00,-10.7687206268311,4.03974914550781,0.34229238626712
1559245824.00,-8.79499912261963,-2.94412064552307,0.490133709781469
1559245826.00,-8.5345401763916,6.8925929069519,0.414498568572985
1559245828.00,-4.15735054016113,0.692847967147827,0.277370252684328
1559245830.00,1.46603751182556,1.87603604793549,0.251749277930019
1559245832.00,-2.74271631240845,1.85179090499878,0.275315731774253
1559245834.00,1.32355129718781,9.78719902038574,0.22987103891552
1559245836.00,-2.88955521583557,1.59017860889435,0.241423150684545
1559245838.00,-3.72821354866028,4.58208799362183,0.346176213704579
1559245840.00,-2.57343244552612,1.83237910270691,0.325903679755709
1559245842.00,-0.715076684951782,3.27798509597778,0.249213228202393
1559245844.00,-1.89223229885101,6.61782789230347,0.247289353468911
1559245846.00,-0.210374265909195,0.323745965957642,0.248786875530892
1559245848.00,-1.31314885616302,6.18715286254883,0.298060296573188
1559245850.00,0.042249608784914,9.11976051330566,0.248961868019832
1559245852.00,-0.730160295963287,-0.0403342247009277,0.233490539025809
1559245854.00,-2.5506310462...

Read more...

Revision history for this message
Lance Arsenault (lance-arsenault) wrote :

quickplot reads values in as doubles which can only store so many digits in the mantissa. So when quickplot reads in all your time values it may be losing digits that are needed at the end of the mantissa. So, for example (not actual), it reads 1559245834.00 as 155924583.0e+1 loosing the 4. Having quickplot be able to handle more digits would slow down quickpplot, and require more coding at this point. I think you might try subtracting 1559245764 from all your time values, and plot that. I'm pretty sure that will work. I'm guessing that's the time in seconds since the year 1970, https://en.wikipedia.org/wiki/Unix_time. Most of the "time" you need to subtract an offset to use it in floating point calculations.

1559245834 seconds --- Looks like you got this data about 117 days ago.

When you "zoom-in too far" with quickplot you are starting to round-off the floating point values to much in the zoom calculations, and the values being displayed will be just the artifacts from the round-off process, and not what you want to look at. Adding higher zooming-precision means adding higher floating point calculation precision.

A feature request might be to add code that detects when a the variance in a field is much smaller than the fields mean value, and have quickplot automatically subtract an offset to the stored values; but display number values as they originally were. I've though about doing that in the past, but as it turns out quickplot is not the only program that will have problems handling like fields, and in all my use cases I filtered these "problem fields" out before using them with any program.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.