Re: pshistogram GMT4.5.11: strange results

Sigward Funke <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Organization Institut für Geophysik
Message-ID <[email protected]>
Dear Paul,

my problem is solved: The option -F works perfectly for me, if I understand it 
right:


>
−F

Center bin on each value. [Default is left edge].
>





>
−I

Inquire about min/max x and y after binning. No plotting is done. Append o 
to output an ASCII table of the resulting x,y data to stdout. 
Alternatively, append O to output all x,y bin data even when y == 0.




My new understanding:
* "-Io" and "-IO" report as x in every case the first margin of the bin 
(independent of "-F"). The second margin of the bin is found adding the value 
given by "-W".
* "-F" forces centered binning, but the output of "-Io" resp. "-IO" shows in 
the x column not the center of the bin but its first margin.

So only the question after the rounding effects of "-F" remains, but in my 
case it is more or less irrelevantly.

Best Regards
Sigward

On Monday 27 January 2014 23:45:52 you wrote:
> On Jan 27, 2014, at 7:20 AM, Sigward Funke <[email protected]> wrote:
> > Hi,
> > 
> > first my questions related to pshistogram:
> > * Could there some influence of rounding and margins of the bins?
> 
> Since your values land exactly on the bin borders things may round
> differently.  Clearly you want centered bins instead (-F).
> 
> > * Can I force 0.1 binning centered at 0.5, 0.6, 0,7 ... 1.5, 1.6, 1.7?
> 
> Yes -F
> 
> > * Or more general: Can I define one margin of the first (or last) bin?
> 
> You mean let the first bin cover everything to the left of it and the last
> everything to the right [or down/up to some specified limit?].  No, but
> you could add a feature request on gmt.soest.hawaii.edu
> 
> I think perhaps pshistogram is backwards when it reports 0.45 etc.  In my
> thinking, without -F we have bins that go from 0.5 to 0.6, 0.6 to 0.7 and
> so on, so the bin centers would be 0.55, 0.65, etc. But that is not what
> is reported.  With -F we should have bins from 0.55 to 0.65, 0.65 to 0.75
> etc, with bin centers at 0.6, 0.7 etc.  So perhaps the output coordinate
> is messed up.  I will check.
> 
> -p
> 
> > Background: Struggeling with pshistogram I created following script:
> > 
> > ------- start test_pshistogram.sh ----------
> > pshistogram -Io -W0.1 -V <<END
> > 1.7
> > 1.4
> > 0.9
> > 0.8
> > 0.8
> > 0.7
> > 0.7
> > 0.6
> > 0.5
> > 0.5
> > 0.5
> > 0.5
> > END
> > -------  end test_pshistogram.sh  ----------
> > 
> > Calling this script I get:
> > 
> > $
> > $ ./test_pshistogram.sh
> > pshistogram: 12 points read
> > pshistogram: WARNING: 12 multiple modes found
> > pshistogram: Extreme values of the data :	0.5	1.7
> > pshistogram: Locations: L2, L1, LMS; Scales: L2, L1, LMS	0.8	0.7	0.6
> > 0.381385035698	0.29652	0.14826
> > 
> > pshistogram: min/max values are :	0.5	1.7	0	5
> > 0.5	5
> > 0.6	2
> > 0.8	2
> > 0.9	1
> > 1.3	1
> > 1.6	1
> > $
> > 
> > The lines beginning with "pshistogram" fit my expections, but in the
> > table of the last lines I would expect:
> > 
> > 0.5 4
> > 0.6 1
> > 0.7 2
> > 0.8 2
> > 0.9 1
> > 1.4 1
> > 1.7 1
> > 
> > Playing with the Option -F the confusion increases. Adding "-F" I get
> > 
> > 0.45	4
> > 0.55	1
> > 0.65	2
> > 0.75	2
> > 0.85	1
> > 1.35	1
> > 1.65	1
> > 
> > Despite of the offset of 0.05 this result looks better, but it isn't what
> > I want. Should I add 0.05 to the first column?
> > 
> > Any hint is welcome!
> > 
> > Best Regards
> > Sigward Funke

To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.