summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkbltGrAxis.C6
-rw-r--r--generic/tkbltGrElemLine.C29
2 files changed, 24 insertions, 11 deletions
diff --git a/generic/tkbltGrAxis.C b/generic/tkbltGrAxis.C
index 418abbb..26560d0 100644
--- a/generic/tkbltGrAxis.C
+++ b/generic/tkbltGrAxis.C
@@ -902,6 +902,12 @@ void Axis::fixRange()
(ops->reqMin >= ops->reqMax)) {
ops->reqMin = ops->reqMax = NAN;
}
+ if (ops->reqMin < -DBL_MAX) {
+ ops->reqMin = -DBL_MAX;
+ }
+ if (ops->reqMax > DBL_MAX) {
+ ops->reqMax = DBL_MAX;
+ }
if (ops->logScale) {
if ((!isnan(ops->reqMin)) && (ops->reqMin <= 0.0))
ops->reqMin = NAN;
diff --git a/generic/tkbltGrElemLine.C b/generic/tkbltGrElemLine.C
index 19a572e..9e3f39a 100644
--- a/generic/tkbltGrElemLine.C
+++ b/generic/tkbltGrElemLine.C
@@ -309,7 +309,6 @@ void LineElement::map()
if (!ops->coords.x || !ops->coords.y ||
!ops->coords.x->nValues() || !ops->coords.y->nValues())
return;
- int np = NUMBEROFPOINTS(ops);
MapInfo mi;
getScreenPoints(&mi);
@@ -320,7 +319,7 @@ void LineElement::map()
// Map connecting line segments if they are to be displayed.
smooth_ = (Smoothing)ops->reqSmooth;
- if ((np > 1) && (ops->builtinPen.traceWidth > 0)) {
+ if ((mi.nScreenPts > 1) && (ops->builtinPen.traceWidth > 0)) {
// Do smoothing if necessary. This can extend the coordinate array,
// so both mi.points and mi.nPoints may change.
switch (smooth_) {
@@ -534,11 +533,27 @@ void LineElement::draw(Drawable drawable)
delete [] points;
}
+ // Error bars
+ for (ChainLink* link = Chain_FirstLink(ops->stylePalette); link;
+ link = Chain_NextLink(link)) {
+ LineStyle* stylePtr = (LineStyle*)Chain_GetValue(link);
+ LinePen* penPtr = (LinePen *)stylePtr->penPtr;
+ LinePenOptions* penOps = (LinePenOptions*)penPtr->ops();
+
+ if ((stylePtr->xeb.length > 0) && (penOps->errorBarShow & SHOW_X))
+ graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
+ stylePtr->xeb.segments, stylePtr->xeb.length);
+
+ if ((stylePtr->yeb.length > 0) && (penOps->errorBarShow & SHOW_Y))
+ graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
+ stylePtr->yeb.segments, stylePtr->yeb.length);
+ }
+
// traces
if ((Chain_GetLength(traces_) > 0) && (penOps->traceWidth > 0))
drawTraces(drawable, penPtr);
- // Symbols, error bars, values
+ // Symbols, values
if (ops->reqMaxSymbols > 0) {
int total = 0;
for (ChainLink* link = Chain_FirstLink(ops->stylePalette); link;
@@ -557,14 +572,6 @@ void LineElement::draw(Drawable drawable)
LinePen* penPtr = (LinePen *)stylePtr->penPtr;
LinePenOptions* penOps = (LinePenOptions*)penPtr->ops();
- if ((stylePtr->xeb.length > 0) && (penOps->errorBarShow & SHOW_X))
- graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
- stylePtr->xeb.segments, stylePtr->xeb.length);
-
- if ((stylePtr->yeb.length > 0) && (penOps->errorBarShow & SHOW_Y))
- graphPtr_->drawSegments(drawable, penPtr->errorBarGC_,
- stylePtr->yeb.segments, stylePtr->yeb.length);
-
if ((stylePtr->symbolPts.length > 0) &&
(penOps->symbol.type != SYMBOL_NONE))
drawSymbols(drawable, penPtr, stylePtr->symbolSize,