- int area_start=-1;
- node = NULL;
- for(ii=1;ii<im->xsize;ii++){
- /* open an area */
- if ( ! isnan(im->gdes[i].p_data[ii-1])
- && ! isnan(im->gdes[i].p_data[ii])){
- if (node == NULL){
- float ybase = 0.0;
-/*
- if (im->gdes[i].gf == GF_STACK) {
-*/
- if ( (im->gdes[i].gf == GF_STACK)
- || (im->gdes[i].stack) ) {
-
- ybase = ytr(im,lastgdes->p_data[ii-1]);
- } else {
- ybase = ytr(im,areazero);
- }
- area_start = ii-1;
- node = gfx_new_area(im->canvas,
- ii-1+im->xorigin,ybase,
- ii-1+im->xorigin,ytr(im,im->gdes[i].p_data[ii-1]),
- ii+im->xorigin,ytr(im,im->gdes[i].p_data[ii]),
- im->gdes[i].col
- );
- } else {
- gfx_add_point(node,ii+im->xorigin,ytr(im,im->gdes[i].p_data[ii]));
- }
+ float ybase0 = DNAN,ytop0=DNAN;
+ for(ii=0;ii<im->xsize;ii++){
+ /* keep things simple for now, just draw these bars
+ do not try to build a big and complex area */
+ float ybase,ytop;
+ if ( im->slopemode == 0 && ii==0){
+ continue;
+ }
+ if ( isnan(im->gdes[i].p_data[ii]) ) {
+ ybase0 = DNAN;
+ continue;
+ }
+ ytop = ytr(im,im->gdes[i].p_data[ii]);
+ if ( lastgdes && im->gdes[i].stack ) {
+ ybase = ytr(im,lastgdes->p_data[ii]);
+ } else {
+ ybase = ytr(im,areazero);