]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix forgotten y_value.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Mar 1999 10:24:33 +0000 (10:24 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Mar 1999 10:24:33 +0000 (10:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@982 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/histogram.cc

index 030872d04462ea44f2a54728bacb97a26d2d32fd..608e37ed566fe892e10f76d6e74e5d67e6230852 100644 (file)
@@ -205,13 +205,13 @@ void Histogram::write_gnuplot (ostream &out) const
        for (unsigned int n=0; n<intervals[i].size(); ++n)
          out << intervals[i][n].left_point
              << ' '
-             << i
+             << y_values[i]
              << ' '
              << intervals[i][n].content
              << endl
              << intervals[i][n].right_point
              << ' '
-             << i
+             << y_values[i]
              << ' '
              << intervals[i][n].content
              << endl;
@@ -221,13 +221,17 @@ void Histogram::write_gnuplot (ostream &out) const
        for (unsigned int n=0; n<intervals[i].size(); ++n)
          out << intervals[i][n].left_point
              << ' '
-             << i+1
+             << (i<intervals.size()-1 ?
+                 y_values[i+1] :
+                 y_values[i] + (y_values[i]-y_values[i-1]))
              << ' '
              << intervals[i][n].content
              << endl
              << intervals[i][n].right_point
              << ' '
-             << i+1
+             << (i<intervals.size()-1 ?
+                 y_values[i+1] :
+                 y_values[i] + (y_values[i]-y_values[i-1]))
              << ' '
              << intervals[i][n].content
              << endl;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.