37 char *xspec, *
yspec, *labx, *laby, *labtop;
47 #define MAX_STRIPC 1000 // Max allowed
73 const PLINT *colline,
const PLINT *styline,
const char *legline[],
74 const char *labx,
const char *laby,
const char *labtop )
81 if ( strip[i] == NULL )
84 if ( i == MAX_STRIPC )
86 plabort(
"plstripc: Cannot create new strip chart" );
94 if ( strip[
sid] == NULL )
96 plabort(
"plstripc: Out of memory." );
106 for ( i = 0; i <
PEN; i++ )
110 stripc->
colline[i] = colline[i];
111 stripc->
styline[i] = styline[i];
113 stripc->
x[i] = (
PLFLT *) malloc( (
size_t)
sizeof (
PLFLT ) * (
size_t) ( stripc->
nptsmax[i] ) );
114 stripc->
y[i] = (
PLFLT *) malloc( (
size_t)
sizeof (
PLFLT ) * (
size_t) ( stripc->
nptsmax[i] ) );
115 if ( stripc->
x[i] == NULL || stripc->
y[i] == NULL )
117 plabort(
"plstripc: Out of memory." );
124 stripc->
xlpos = xlpos;
125 stripc->
ylpos = ylpos;
130 stripc->
xjump = xjump;
157 plwind( -0.01, 1.01, -0.01, 1.01 );
158 for ( i = 0; i <
PEN; i++ )
160 if ( stripcloc->
npts[i] || first )
204 for ( i = 0; i <
PEN; i++ )
206 if ( striploc->
npts[i] > 0 )
209 plline( striploc->
npts[i], striploc->
x[i], striploc->
y[i] );
225 int j, yasc = 0, istart;
234 ( ( stripc = strip[
id] ) == NULL ) )
236 plabort(
"Non existent stripchart" );
245 stripc->
x[p] = (
PLFLT *) realloc( (
void *) stripc->
x[p],
sizeof (
PLFLT ) * (
size_t) ( stripc->
nptsmax[p] ) );
246 stripc->
y[p] = (
PLFLT *) realloc( (
void *) stripc->
y[p],
sizeof (
PLFLT ) * (
size_t) ( stripc->
nptsmax[p] ) );
247 if ( stripc->
x[p] == NULL || stripc->
y[p] == NULL )
249 plabort(
"plstripc: Out of memory." );
255 stripc->
x[p][stripc->
npts[p] - 1] =
x;
256 stripc->
y[p][stripc->
npts[p] - 1] =
y;
260 if ( stripc->
y_ascl == 1 && ( y > stripc->
ymax || y < stripc->
ymin ) )
263 if ( y > stripc->
ymax )
264 stripc->
ymax = stripc->
ymin + 1.1 * ( y - stripc->
ymin );
265 if ( y < stripc->ymin )
278 if ( ( stripc->
npts[p] - 2 ) < 0 )
294 if ( stripc->
acc == 0 )
296 for ( j = 0; j <
PEN; j++ )
298 if ( stripc->
npts[j] > 0 )
301 while ( stripc->
x[j][istart] < stripc->
xmin + stripc->
xlen * stripc->
xjump )
304 stripc->
npts[j] = stripc->
npts[j] - istart;
305 memcpy( &stripc->
x[j][0], &stripc->
x[j][istart], (
size_t) ( stripc->
npts[j] ) * sizeof (
PLFLT ) );
306 memcpy( &stripc->
y[j][0], &stripc->
y[j][istart], (
size_t) ( stripc->
npts[j] ) * sizeof (
PLFLT ) );
313 if ( stripc->
acc == 0 )
316 stripc->
xmin = stripc->
x[p][0];
334 ( ( stripc = strip[
id] ) == NULL ) )
336 plabort(
"Non existent stripchart" );
340 for ( i = 0; i <
PEN; i++ )
342 if ( stripc->
npts[i] )
344 free( (
void *) stripc->
x[i] );
345 free( (
void *) stripc->
y[i] );
350 free( stripc->
xspec );
351 free( stripc->
yspec );
352 free( stripc->
labx );
353 free( stripc->
laby );
355 free( (
void *) stripc );
subroutine plbox(xopt, xtick, nxsub, yopt, ytick, nysub)
void plP_movwor(PLFLT x, PLFLT y)
static void plstrip_legend(PLStrip *strip, int flag)
void PLFLT PLINT PLINT PLFLT x
void c_plstripa(PLINT id, PLINT p, PLFLT x, PLFLT y)
void PLFLT PLINT PLINT PLFLT PLFLT y
void c_plstripd(PLINT id)
static PLStrip * strip[MAX_STRIPC]
char PLDLLIMPEXP * plstrdup(const char *src)
subroutine plptex(x, y, dx, dy, xjust, text)
static void plstrip_gen(PLStrip *strip)
subroutine pllab(xlab, ylab, title)
void plabort(const char *errormsg)
void plP_drawor(PLFLT x, PLFLT y)
void c_plstripc(PLINT *id, const char *xspec, const char *yspec, PLFLT xmin, PLFLT xmax, PLFLT xjump, PLFLT ymin, PLFLT ymax, PLFLT xlpos, PLFLT ylpos, PLINT y_ascl, PLINT acc, PLINT colbox, PLINT collab, const PLINT *colline, const PLINT *styline, const char *legline[], const char *labx, const char *laby, const char *labtop)