[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately |
Date: |
Tue, 06 Sep 2011 15:29:27 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1 |
Follow-up Comment #5, bug #34207 (project octave):
This fixes most of the problem for me.
diff --git a/src/graphics.cc b/src/graphics.cc
--- a/src/graphics.cc
+++ b/src/graphics.cc
@@ -5263,6 +5263,13 @@
double tick_sep = calc_tick_sep (lo , hi);
+ if (is_logscale && ! (xisinf (hi) || xisinf (lo)))
+ {
+ // FIXME - what if (hi-lo) < tick_sep?
+ // ex: loglog ([1 1.1])
+ tick_sep = std::max (tick_sep, 1.);
+ }
+
int i1 = static_cast<int> (gnulib::floor (lo / tick_sep));
int i2 = static_cast<int> (std::ceil (hi / tick_sep));
However, for plots like loglog([1 1.1]) the result would look better if the
axis limits were tighter (meaning I think the tick_sep is correct, but the
axis limits are too loose).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34207>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael Godfrey, 2011/09/04
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Ben Abbott, 2011/09/05
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Ben Abbott, 2011/09/05
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael Godfrey, 2011/09/05
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael Godfrey, 2011/09/05
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael Godfrey, 2011/09/05
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately,
Ben Abbott <=
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael Godfrey, 2011/09/06
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael Godfrey, 2011/09/06
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Ben Abbott, 2011/09/06
- Re: [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Michael D Godfrey, 2011/09/07
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Ben Abbott, 2011/09/16
- [Octave-bug-tracker] [bug #34207] gl-render does not set tick labels for log axes appropriately, Ben Abbott, 2011/09/18