cairo-fsm: Honor displaying footnote markers as subscripts.
[pspp] / src / output / charts / spreadlevel-plot.c
index 44e2c658a93464c025ccc4a8bb34fa483935f31c..e4fed6178666fdfe4fbe9fc161d697fc50c17d65 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012, 2020 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -53,10 +53,11 @@ spreadlevel_plot_add (struct chart_item *ci, double spread, double level)
 {
   struct spreadlevel_plot_chart *sl = to_spreadlevel_plot_chart (ci);
 
-  if ( sl->tx_pwr == 0)
+  /* Zero has a special meaning, in this implementation.  */
+  if (sl->tx_pwr == 0)
     {
-      spread = log (spread);
-      level = log (level);
+      spread = log (fabs (spread));
+      level = log (fabs (level));
     }
   else
     {