John Darrington [Wed, 17 Jun 2015 20:11:25 +0000 (22:11 +0200)]
Charts: internationalise representation of scientific format.
It seems that when representing real numbers in scientific
notation, there are several cultural conventions. This change
allows the translators to choose the convention best suited
to their locale.
charts: switched from bullet operator to multiplication sign for numbers
The previous switch to pango used the bullet operator for the display
of scientific numbers in charts. Now the numbers are displayed in the
form: 1.5x10^5 instead as 1.5.10^5.
charts: switched from bullet operator to multiplication sign for numbers
The previous switch to pango used the bullet operator for the display
of scientific numbers in charts. Now the numbers are displayed in the
form: 1.5x10^5 instead as 1.5.10^5.
Ben Pfaff [Mon, 15 Jun 2015 15:22:17 +0000 (08:22 -0700)]
tests: Unset $TERM to avoid error if $TERM is set to an unknown terminal.
Reported by Friedrich Beckmann <friedrich.beckmann@gmx.de>.
See failed tests here:
https://launchpadlibrarian.net/209052134/buildlog_ubuntu-wily-i386.pspp_0.8.4-1_BUILDING.txt.gz
Ben Pfaff [Sun, 14 Jun 2015 21:24:20 +0000 (14:24 -0700)]
plot-hist-cairo: Clip normal curve.
Otherwise a tall normal curve can go way above the intended data
rectangle to spill out even beyond the page boundary, as shown in
the PDF examples in bug #45192.
gtk3 - output window: migrated to style context, less rerendering
I replaced the deprecated gtk_style_get with the style_context
constructs. The rerendering is now only called after size-allocation or
style updates. The xr fonts are only updated after a style-updated
signal. The style is now derived from the view class for the GtkLayout
widget.
output window: click on overview item adjusts output view (jump)
On MacOS clicking on the overview item did not result in a correct
adjustment of the output window. The reason is that view->y is of type
integer but type long is stored in the treestore. This requires correct
type casting.
replaced decimal module, xrchart_scale with autoformat, histogram x-axis ticks changed.
During gtk3 osx debugging the decimal unit crashed. I replaced the decimal computations
with traditional tick interval computation plus a printf format string generation which is
adapted to the chosen tick style.
The xrchart scales writing are adapted to use this mechanism. If the tick text is too long
to fit in the interval, then the tick label uses the existing rotation by 45 degrees. I added
some space below the x-axis to make the tick labels visible. Maybe the tick label placement
could also be done in two rows for the even and odd ticks.
The histogram x-axis tick generation is changed from a tick per bin to the usual
normal x-axis tick generation. This allows easier visual bin border identification.
The bin width is adapted to the chosen x-axis tick scale. Any number of bins can now
be visualized. This is according to the spss examples I found for the histograms.
output window: click on overview item adjusts output view (jump)
On MacOS clicking on the overview item did not result in a correct
adjustment of the output window. The reason is that view->y is of type
integer but type long is stored in the treestore. This requires correct
type casting.
I added allocation setting to the drawing areas in the output window. The
problem occured in osx gtk3 branch and is described in bug #45229. The
content of the output window was not rendered correctly in the initial
window but only after a resize. Setting the size request for the drawing
areas is not enough because the current allocation is not immediatly changed.
The clipping is based on the current allocation, while the drawing is based
on the results from the rerender function. This problem is related to
the problem described in bug #43362.
replaced decimal module, xrchart_scale with autoformat, histogram x-axis ticks changed.
During gtk3 osx debugging the decimal unit crashed. I replaced the decimal computations
with traditional tick interval computation plus a printf format string generation which is
adapted to the chosen tick style.
The xrchart scales writing are adapted to use this mechanism. If the tick text is too long
to fit in the interval, then the tick label uses the existing rotation by 45 degrees. I added
some space below the x-axis to make the tick labels visible. Maybe the tick label placement
could also be done in two rows for the even and odd ticks.
The histogram x-axis tick generation is changed from a tick per bin to the usual
normal x-axis tick generation. This allows easier visual bin border identification.
The bin width is adapted to the chosen x-axis tick scale. Any number of bins can now
be visualized. This is according to the spss examples I found for the histograms.
histogram tick drawing - added format generation for optimum tick drawing
Fixes bug #45192 which showed up in the gtk3 branch on MacOS.
It replaces the decimal_xxx computations with a routine that computes a
formatting string and a scale factor for a given axis range and number of
bins. The formatting will switch between normal and scientific depending on
the length of the displayed label text. The formatting is such that no
rounded numbers like 3.9999999 when in fact 4 is expected is shown.
Differences between bins remain visible in the tick labels.
In addition the width of the rendered labels is compared with the width
of the bins in the display such that the labels will automatically
switch between horizontal and 45 degree display.
histogram tick drawing - added format generation for optimum tick drawing
Fixes bug #45192 which showed up in the gtk3 branch on MacOS.
It replaces the decimal_xxx computations with a routine that computes a
formatting string and a scale factor for a given axis range and number of
bins. The formatting will switch between normal and scientific depending on
the length of the displayed label text. The formatting is such that no
rounded numbers like 3.9999999 when in fact 4 is expected is shown.
Differences between bins remain visible in the tick labels.
In addition the width of the rendered labels is compared with the width
of the bins in the display such that the labels will automatically
switch between horizontal and 45 degree display.
gtk3 - adapted draw routine to gtk_cairo_should_draw_window. gtk-criticals with undefined drag window disappeared. The gtk-criticals showed up in debian 8.
fixed initial show of names in header window. Variable names only showed up after switching between variable and data window. The reason is that the buttons of the columns are not created. This is due to interdependency between the size allocation and the button creation. I removed the need_button mechanism.
Switch the order in which scatterplot axes appear in the graphic's caption.
Hulliger Beat <beat.hulliger@fhnw.ch> Reported that scatterplots were titled 'x vs. y'
where x and y were opposite to what is conventional. This change fixes that.
Ben Pfaff [Tue, 10 Mar 2015 02:45:32 +0000 (19:45 -0700)]
help-pages-list: Distribute.
Otherwise "make distcheck" will have to regenerate it, which means
that it will have to regenerate doc/pspp.xml (because it depends on
help-pages-list) but that's not possible under "make distcheck"
because it makes the source directory read-only.
Ben Pfaff [Sun, 8 Mar 2015 20:34:10 +0000 (13:34 -0700)]
configure: Create "doc" directory in build directory.
Otherwise we get build failures from the autobuilder when the rule
in gui/automake.mk tries to create doc/help-pages-list. Problem
introduced in commit 531de52e961c (PsppireDialog: New property:
help-page).
Developers probably didn't notice this problem because they probably
already had doc/ directories in their build directories due to
building PDF versions of the documentation at one time or another, or
because they do builds in the source directory.
John Darrington [Fri, 23 Jan 2015 18:23:43 +0000 (19:23 +0100)]
Ensure that example_dir is relocatable.
commit be1157c5591142920a95d587acf97f5eaf3d04fe added a reference to the
installed data directory. Unfortunately I forgot to allow for relocatable
installations. This change fixes that.
John Darrington [Tue, 6 Jan 2015 06:25:21 +0000 (07:25 +0100)]
New module to perform decimal floating point arithmetic for charts.
This change adds a small module to perform floating point arithmetic
with a decimal base, and uses it to calculate the graticule marks for
charts.
Rationale: Graticule marks want to be displayed in decimal. However
not all decimal values can be represented in a double precision
floating point binary. This approach pushes the precision loss from
the value of the mark, to the position on the chart - we don't
particularly care if a tick mark is a fraction of a pixel out of place,
but we do care if 4.0 is displayed as 3.9999999999