After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745960 - log-axis and invalid data
log-axis and invalid data
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: Graphing / Charting
GIT
Other Linux
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2015-03-10 11:59 UTC by Morten Welinder
Modified: 2015-03-25 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Plot with log axis and invalid data (2.45 KB, application/spreadsheet)
2015-03-10 12:00 UTC, Morten Welinder
Details

Description Morten Welinder 2015-03-10 11:59:23 UTC
The to-be-attached file has an xy-plot with y being a log axis.

There is a single point that is invalid: y=-1.  That single point should
be ignored for purposes of figuring out min/max/major/minor for the axis,
but it looks like it forces min=0.1

We have gog_axis_map_finite to check validity of points, but we may not
be using it consistently.
Comment 1 Morten Welinder 2015-03-10 12:00:22 UTC
Created attachment 298975 [details]
Plot with log axis and invalid data
Comment 2 Jean Bréfort 2015-03-10 12:10:44 UTC
Hmm, and deleting the invalid value hides the Y-axis ticks and labels. Really weird
Comment 3 Jean Bréfort 2015-03-10 12:25:52 UTC
The issue is that we get the double range for each axis without any consideration for the axis type (except discrete vs. continuous). And in the log map code, we replace a negative bound by 1.0. Not sure this can be easily fixed, at least without an API break, so this might go to the goffice-0.12 bugs list.
Comment 4 Morten Welinder 2015-03-10 12:36:29 UTC
I think we can do it.

gog_2d_plot_axis_get_bounds can call plot_get_axis to get the actual
axis.
Comment 5 Jean Bréfort 2015-03-10 12:50:08 UTC
Might work. Anyway we'll need to change the code for each plot type accepting a log map, that is all plot types (except pies and rings).
Comment 6 Jean Bréfort 2015-03-10 13:18:26 UTC
Fixed the vanishing ticks issue.
Comment 7 Morten Welinder 2015-03-13 00:45:20 UTC
Tentative patch (for xy only) applied.
Comment 8 Jean Bréfort 2015-03-13 06:52:05 UTC
I don't see the patch.
Comment 9 Morten Welinder 2015-03-13 11:28:17 UTC
I committed it.
Comment 10 Morten Welinder 2015-03-25 00:25:05 UTC
Fixed for bar/col too.

This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Comment 11 Jean Bréfort 2015-03-25 05:38:37 UTC
Radar and polar plots might be affected too, at least.
Comment 12 Morten Welinder 2015-03-25 12:28:26 UTC
Polar fixed too.