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 680486 - strange contour plot
strange contour plot
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other Linux
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-07-23 20:46 UTC by Frédéric Parrenin
Modified: 2012-07-29 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the .gnumeric file to reproduce the problem (118.34 KB, application/x-gnumeric)
2012-07-23 20:46 UTC, Frédéric Parrenin
Details
small sample file (2.76 KB, application/gnumeric)
2012-07-23 22:29 UTC, Andreas J. Guelzow
Details
The original plot with nan instead of 0 (46.88 KB, image/svg+xml)
2012-07-24 06:09 UTC, Jean Bréfort
Details

Description Frédéric Parrenin 2012-07-23 20:46:03 UTC
Steps to reproduce the problem:
- open the attached sheet
- observe the strange feature in the bottom-left part of the chart, which is not present in the data
Comment 1 Frédéric Parrenin 2012-07-23 20:46:22 UTC
Created attachment 219534 [details]
the .gnumeric file to reproduce the problem
Comment 2 Jean Bréfort 2012-07-23 21:04:14 UTC
Might be rounding issues. I'll investigate that as soon as possible.
Comment 3 Andreas J. Guelzow 2012-07-23 21:17:50 UTC
Please be more specific about which "strange feature" you are referring to. Which x,y coordinate do you think has the wrong colour?
Comment 4 Frédéric Parrenin 2012-07-23 21:26:35 UTC
This represents the age along a steady ice sheet flow line. The flow is laminar so that the iso-age lines should be very smooth.

Around (40,350) there is a dark pink area inside the light pink area.
Also, note how the limit between the dark pink and the light blue areas oscillates all along the x-axis range.
Comment 5 Andreas J. Guelzow 2012-07-23 22:08:42 UTC
So looking a the data for x=29.6 (on x-sheet) I see only y-values (on z-sheet) down to 412. The problem values occur below that. So I don't see any data that yields values in teh region of problem.

@Jean, how do we determine colour if there are no values for the area in question?
Comment 6 Andreas J. Guelzow 2012-07-23 22:12:57 UTC
@Jean, you may want to remove the xy-plot from the sample file. It clearly has noting to do with the issue at hand.

@Frédéric, it would be helpful if you could provide minimal examples for the problems you encounter.
Comment 7 Andreas J. Guelzow 2012-07-23 22:29:14 UTC
Created attachment 219538 [details]
small sample file

In this file with only a 5 by 5 data grid, there is clearly something wrong with the contour plot. for the x-value 30, there should be no disjoint 4000-5000 regions.
Comment 8 Andreas J. Guelzow 2012-07-23 23:19:12 UTC
Regarding my example of comment #7, teh plot looks reasonable if I decrease the number of columns and rows to 4 each. So there seems to be an interpolation issue.
Comment 9 Jean Bréfort 2012-07-24 06:06:50 UTC
Andreas, if there are no values, 0 is used. Looks like using NAN instead fixes the issue.
Comment 10 Jean Bréfort 2012-07-24 06:09:15 UTC
Created attachment 219547 [details]
The original plot with nan instead of 0

Frédéric, is that what you expect?
Comment 11 Jean Bréfort 2012-07-26 14:24:24 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 12 Andreas J. Guelzow 2012-07-27 19:34:58 UTC
Something isn't right with this fix. Why is the contour plot of comment #7 invisible?
Comment 13 Jean Bréfort 2012-07-28 06:59:55 UTC
There are no enough data. You are using a 9x9 grid with only 25 values, so there are no data available for most knots, and you need at least three valid data to display something inside a tile. With a 5x5 grid things seem to be correct.

We might try to interpolate issing data, but I'm not sure it's a good idea.
Comment 14 Jean Bréfort 2012-07-28 09:23:31 UTC
Using nan instead of 0 is not always a good choice. I'll add an option box.
Comment 15 Andreas J. Guelzow 2012-07-28 15:50:54 UTC
The 9by9 grid is a default setting that I did not touch. A user would be surprised about the result (whether with NaNs or 0).

I would think that the default for the grid size should be somehow "auto" that figures out a reasonable grid based on teh data size given.
Comment 16 Andreas J. Guelzow 2012-07-28 18:15:45 UTC
Even with a gridsize of 9 and only 25 values, there should be some grid squares (at least 2 up to 25) that contain some values, so we should always see at least 2 square regions with colour, in this case there should probably be close to 25.
Comment 17 Jean Bréfort 2012-07-29 15:12:11 UTC
No, you need at least three values around a tile to have something displayed.

I added an option for using 0 instead of nan.
Comment 18 Andreas J. Guelzow 2012-07-29 21:50:15 UTC
I guess I was thin king of a slightly different plot type. I have filed bug #680806 for that.