Bug 299788 - Plot axis ranges are off by one pixel
Summary: Plot axis ranges are off by one pixel
Status: RESOLVED WORKSFORME
Alias: None
Product: kst
Classification: Applications
Component: view objects (show other bugs)
Version: 2.0.4
Platform: Compiled Sources Linux
: VLO normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 01:27 UTC by D. V. Wiebe
Modified: 2023-02-11 03:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test plot showing the bug. (10.15 KB, image/png)
2012-05-11 01:29 UTC, D. V. Wiebe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2012-05-11 01:27:00 UTC
When setting plot limits to fixed values, the lower X limit is plotted one pixel to the right of the left edge of the plot.  Similarly, the upper Y limit is plotted one pixel below the top of the plot.

Reproducible: Always

Steps to Reproduce:
1.  Create a new plot object.
2.  Fix the limits of the plot (Edit Plot Item -> Range/Zoom -> X/Y Zoom Mode -> Fixed) to values which will induce major ticks on the edges of the plots.   For instance, use from 0 to 1 for both X and Y axes.
Actual Results:  
The 0 tick mark and grid line of the X axis is one pixel to the right of the left border of the plot.  Similary, the 1 tick mark and grid line of the Y axis is one pixel below the top border of the plot.

Expected Results:  
The left and top plot range limits should correspond to the edges of the plot, as the bottom and right limits do.
Comment 1 D. V. Wiebe 2012-05-11 01:29:59 UTC
Created attachment 71013 [details]
Test plot showing the bug.

Here's a exported PNG showing the bug following the steps outlined above.  Note spurious tick marks in the bottom left, top left (two), and top right corners of the plot, as well as dotted grid lines along the top and left side of the plot.
Comment 2 Netterfield 2012-05-25 19:06:54 UTC
Which behavior (top left, or bottom right) is more appropriate?

In the bottom right behavior, a line which defines the boundry of the region is not seen.  In the top-left behavior, it is.

I sort of like the top-left behavior.
Comment 3 D. V. Wiebe 2012-05-25 22:05:55 UTC
Yeah, I seem I recall you advocating top-left in the past.

I'm going to argue for bottom-right, for the simple fact that it's easier to emulate top-left if BR is the default (just add epsilon to your limits), but much harder to get BR if kst does TL, since in that case you have to figure out how big a pixel is in axis unit, which requires knowing the size of the plot in pixels.
Comment 4 Netterfield 2014-06-17 15:19:15 UTC
Described differently, the current implementation is 
[xmin, xmax) 

That is, a value of xmin is shown in the plot, but a value of xmax is not.

However: the data do agree with the plot ticks. The only bug here is that the plot is 1 pixel wider than is asked for (or 1 pixel narrower, depending what you think you asked for) .  This is completely invisible for vector based outputs - where you might actually care.

So it is unlikely that we will fix this any time soon.
Comment 5 Andrew Crouthamel 2018-11-12 02:46:36 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Andrew Crouthamel 2018-11-21 04:41:30 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Justin Zobel 2023-01-12 01:58:00 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 8 Bug Janitor Service 2023-01-27 05:07:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2023-02-11 03:52:03 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!