Opened 10 years ago
Closed 8 years ago
#2463 closed defect (fixed)
d.histogram x-axis numbering incorrect
Reported by: | richardc | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.5 |
Component: | Display | Version: | svn-releasebranch70 |
Keywords: | d.histogram | Cc: | |
CPU: | x86-32 | Platform: | Linux |
Description
Generating histogram by clicking on icon in Map Display generates a histogram with incorrect numbering along x-axis.
File type: FCELL Range: min = 0 max = 158.3026
pls see image posted in past: http://osgeo-org.1560.x6.nabble.com/file/n5024823/x_axis_histogram_ticks.jpg
Richard
GRASS version: 7.0.0svn GRASS SVN Revision: 62228 Build Date: 2014-10-12 Build Platform: i686-pc-linux-gnu GDAL/OGR: 1.9.2 PROJ.4: 4.9.0 GEOS: 3.4.2 SQLite: 3.7.9 Python: 2.7.3 wxPython: 2.8.12.1 Platform: Linux-3.2.0-31-generic-pae-i686-with-LinuxMint-13-maya
Attachments (5)
Change History (16)
by , 10 years ago
Attachment: | dhistogram.png added |
---|
comment:1 by , 10 years ago
Keywords: | d.histogran added |
---|
comment:2 by , 10 years ago
Keywords: | d.histogram added; d.histogran removed |
---|
comment:3 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
by , 8 years ago
Attachment: | histogram_sin_row.png added |
---|
Histogram of r.mapcalc "sinr = sin(row())"
comment:5 by , 8 years ago
by , 8 years ago
Attachment: | sin_decimals.png added |
---|
Histogram for [-1, 1] range with digits after decimal point
comment:6 by , 8 years ago
I found the problem. Digits after decimal points are displeyd only if (max - min) <= 1.0
. In this case max - min = 2.0
. I can easily fix it with abs()
but maybe we should discuss what is the right condition to decide when display decimal number and when only rounded value.
comment:7 by , 8 years ago
I changed the condition to if ((double)(tic_every * (range_dmax - range_dmin) / nsteps) < 1.0)
and tested it on several raster maps. Results look good.
comment:11 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is current screenshot from GRASS version: 7.0.0svn GRASS SVN Revision: 62228