On 19/07/2017 18:45, Tomaz Canabrava wrote:
Hey people,I'll have one week to work on subsurface because of Akademy, without work or wife interference :)So I really think I'll be able to do something good there.About the mockups - they are good for desktop but they don't take into account mobile.but I'll try to do that. Tomaz
Tomaz,That would be great. There is one issue we discussed that was not finalised, the number of bars in each of the histograms. You could initially use a fixed scheme and I or someone else could adapt it afterwards to be more flexible without UI intervention. Alternatively, here is a (sort of) algorithm that is likely to work to calculate the number of bars. Maybe you have your own ideas, then please ignore all of this.
# For each histogram:
# -------------------
binvalue = {1.0, 2.0, 2.5, 5.0, 10.0, 20.0}
Find minimum and maximum values of data to be graphed
range = maximum-minimum
BinSize = binvalue with size just > (range/10)
# e.g. if (range/10 == 3) then BinSize = 5;
# with our testdata (range/10=5.6969) then BinSize=10
Startvalue = largest multiple of BinSize just < minimum
In case that my help you, I attach a LibreOffice spreadsheet that uses
this algorithm on a dataset of 54 values (the blue column).
Ignore the multiplier value. A histogram (red bars) representing these
values is also shown. Unfortunately LibreOffice does not place the
numbers below the graph in the correct places.
Basically this uses part of the calculations one would do anyway to draw
a histogram. Only difference is that we dynamically determine BinSize
and Startvalue based on the chracteristics of the data.
I attach an image if what that histogram should look like if all labels
were written correctly. The bars can be wider and touching or narrower
like in the attached jpg file. I personally prefer wider bars.
I hope this is understandable. Kind regards, willem
Histogram.ods
Description: application/vnd.oasis.opendocument.spreadsheet
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
