The R Project SVN R

Rev

Rev 30980 | Rev 31049 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30980 Rev 30998
Line 858... Line 858...
858
	}
858
	}
859
    }
859
    }
860
    return at;
860
    return at;
861
}
861
}
862
 
862
 
-
 
863
static double ComputePAdjValue(double padj, int side, int las)
-
 
864
{
-
 
865
    if (!R_FINITE(padj)) {
-
 
866
    switch(las) {
-
 
867
    case 0:/* parallel to axis */
-
 
868
        padj = 0.0; break;
-
 
869
    case 1:/* horizontal */
-
 
870
        switch(side) {
-
 
871
        case 1:
-
 
872
        case 3: padj = 0.0; break;
-
 
873
        case 2:
-
 
874
        case 4: padj = 0.5; break;
-
 
875
        }
-
 
876
        break;
-
 
877
    case 2:/* perpendicular to axis */
-
 
878
        padj = 0.5; break;
-
 
879
    case 3:/* vertical */
-
 
880
        switch(side) {
-
 
881
        case 1: 
-
 
882
        case 3: padj = 0.5; break;
-
 
883
        case 2:
-
 
884
        case 4: padj = 0.0; break;
-
 
885
        }
-
 
886
        break;
-
 
887
    }
-
 
888
    }
-
 
889
    return padj;
-
 
890
}
-
 
891
 
863
SEXP do_axis(SEXP call, SEXP op, SEXP args, SEXP env)
892
SEXP do_axis(SEXP call, SEXP op, SEXP args, SEXP env)
864
{
893
{
865
    /* axis(side, at, labels, tick, line, pos,
894
    /* axis(side, at, labels, tick, line, pos,
866
     *	    outer, font, vfont, lty, lwd, col, ...) */
895
     *	    outer, font, vfont, lty, lwd, col, padj, ...) */
867
 
896
 
868
    SEXP at, lab, vfont;
897
    SEXP at, lab, vfont, padj;
869
    int col, font, lty;
898
    int col, font, lty, npadj;
870
    int i, n, nint = 0, ntmp, side, *ind, outer, lineoff = 0;
899
    int i, n, nint = 0, ntmp, side, *ind, outer, lineoff = 0;
871
    int istart, iend, incr;
900
    int istart, iend, incr;
872
    Rboolean dolabels, doticks, logflag = FALSE;
901
    Rboolean dolabels, doticks, logflag = FALSE;
873
    Rboolean create_at, vectorFonts = FALSE;
902
    Rboolean create_at, vectorFonts = FALSE;
874
    double x, y, temp, tnew, tlast;
903
    double x, y, temp, tnew, tlast;
Line 985... Line 1014...
985
 
1014
 
986
    /* Optional argument: "col" */
1015
    /* Optional argument: "col" */
987
    col = asInteger(FixupCol(CAR(args), Rf_gpptr(dd)->fg));
1016
    col = asInteger(FixupCol(CAR(args), Rf_gpptr(dd)->fg));
988
    args = CDR(args);
1017
    args = CDR(args);
989
 
1018
 
-
 
1019
    /* Optional argument: "padj" */
-
 
1020
    PROTECT(padj = coerceVector(CAR(args), REALSXP));
-
 
1021
    npadj = length(padj);
-
 
1022
    if (npadj <= 0) errorcall(call, "zero length \"padj\" specified");
-
 
1023
    if (n < npadj) n = npadj;
-
 
1024
    args = CDR(args);    
-
 
1025
 
990
    /* Retrieve relevant "par" values. */
1026
    /* Retrieve relevant "par" values. */
991
 
1027
 
992
    switch(side) {
1028
    switch(side) {
993
    case 1:
1029
    case 1:
994
    case 3:
1030
    case 3:
Line 1064... Line 1100...
1064
     * If it is, we just bail out at this point. */
1100
     * If it is, we just bail out at this point. */
1065
 
1101
 
1066
    if (((side == 1 || side == 3) && Rf_gpptr(dd)->xaxt == 'n') ||
1102
    if (((side == 1 || side == 3) && Rf_gpptr(dd)->xaxt == 'n') ||
1067
	((side == 2 || side == 4) && Rf_gpptr(dd)->yaxt == 'n')) {
1103
	((side == 2 || side == 4) && Rf_gpptr(dd)->yaxt == 'n')) {
1068
	GRestorePars(dd);
1104
	GRestorePars(dd);
1069
	UNPROTECT(4);
1105
	UNPROTECT(5);
1070
	return R_NilValue;
1106
	return R_NilValue;
1071
    }
1107
    }
1072
 
1108
 
1073
 
1109
 
1074
    /* no! we do allow an `lty' argument -- will not be used often though
1110
    /* no! we do allow an `lty' argument -- will not be used often though
Line 1182... Line 1218...
1182
	    istart = 0;
1218
	    istart = 0;
1183
	    iend = n;
1219
	    iend = n;
1184
	    incr = 1;
1220
	    incr = 1;
1185
	}
1221
	}
1186
	for (i = istart; i != iend; i += incr) {
1222
	for (i = istart; i != iend; i += incr) {
-
 
1223
	    double padjval = REAL(padj)[i%npadj];
-
 
1224
	    padjval = ComputePAdjValue(padjval, side, Rf_gpptr(dd)->las);
1187
	    x = REAL(at)[i];
1225
	    x = REAL(at)[i];
1188
	    if (!R_FINITE(x)) continue;
1226
	    if (!R_FINITE(x)) continue;
1189
	    temp = GConvertX(x, USER, NFC, dd);
1227
	    temp = GConvertX(x, USER, NFC, dd);
1190
	    if (dolabels) {
1228
	    if (dolabels) {
1191
		/* Clip tick labels to user coordinates. */
1229
		/* Clip tick labels to user coordinates. */
1192
		if (x > low && x < high) {
1230
		if (x > low && x < high) {
1193
		    if (isExpression(lab)) {
1231
		    if (isExpression(lab)) {
1194
			GMMathText(VECTOR_ELT(lab, ind[i]), side,
1232
			GMMathText(VECTOR_ELT(lab, ind[i]), side,
1195
				   axis_lab, 0, x, Rf_gpptr(dd)->las, dd);
1233
				   axis_lab, 0, x, Rf_gpptr(dd)->las, 
-
 
1234
				   padjval, dd);
1196
		    }
1235
		    }
1197
		    else {
1236
		    else {
1198
			label = STRING_ELT(lab, ind[i]);
1237
			label = STRING_ELT(lab, ind[i]);
1199
			if(label != NA_STRING) {
1238
			if(label != NA_STRING) {
1200
			    labw = GStrWidth(CHAR(label), NFC, dd);
1239
			    labw = GStrWidth(CHAR(label), NFC, dd);
Line 1202... Line 1241...
1202
			    /* Check room for perpendicular labels. */
1241
			    /* Check room for perpendicular labels. */
1203
			    if (Rf_gpptr(dd)->las == 2 ||
1242
			    if (Rf_gpptr(dd)->las == 2 ||
1204
				Rf_gpptr(dd)->las == 3 ||
1243
				Rf_gpptr(dd)->las == 3 ||
1205
				tnew - tlast >= gap) {
1244
				tnew - tlast >= gap) {
1206
				GMtext(CHAR(label), side, axis_lab, 0, x,
1245
				GMtext(CHAR(label), side, axis_lab, 0, x,
1207
				       Rf_gpptr(dd)->las, dd);
1246
				       Rf_gpptr(dd)->las, padjval, dd);
1208
				tlast = temp + 0.5 *labw;
1247
				tlast = temp + 0.5 *labw;
1209
			    }
1248
			    }
1210
			}
1249
			}
1211
		    }
1250
		    }
1212
		}
1251
		}
Line 1307... Line 1346...
1307
	    istart = 0;
1346
	    istart = 0;
1308
	    iend = n;
1347
	    iend = n;
1309
	    incr = 1;
1348
	    incr = 1;
1310
	}
1349
	}
1311
	for (i = istart; i != iend; i += incr) {
1350
	for (i = istart; i != iend; i += incr) {
-
 
1351
	    double padjval = REAL(padj)[i%npadj];
-
 
1352
	    padjval = ComputePAdjValue(padjval, side, Rf_gpptr(dd)->las);
1312
	    y = REAL(at)[i];
1353
	    y = REAL(at)[i];
1313
	    if (!R_FINITE(y)) continue;
1354
	    if (!R_FINITE(y)) continue;
1314
	    temp = GConvertY(y, USER, NFC, dd);
1355
	    temp = GConvertY(y, USER, NFC, dd);
1315
	    if (dolabels) {
1356
	    if (dolabels) {
1316
		/* Clip tick labels to user coordinates. */
1357
		/* Clip tick labels to user coordinates. */
1317
		if (y > low && y < high) {
1358
		if (y > low && y < high) {
1318
		    if (isExpression(lab)) {
1359
		    if (isExpression(lab)) {
1319
			GMMathText(VECTOR_ELT(lab, ind[i]), side,
1360
			GMMathText(VECTOR_ELT(lab, ind[i]), side,
1320
				   axis_lab, 0, y, Rf_gpptr(dd)->las, dd);
1361
				   axis_lab, 0, y, Rf_gpptr(dd)->las, 
-
 
1362
				   padjval, dd);
1321
		    }
1363
		    }
1322
		    else {
1364
		    else {
1323
			label = STRING_ELT(lab, ind[i]);
1365
			label = STRING_ELT(lab, ind[i]);
1324
			if(label != NA_STRING) {
1366
			if(label != NA_STRING) {
1325
			    labw = GStrWidth(CHAR(label), INCHES, dd);
1367
			    labw = GStrWidth(CHAR(label), INCHES, dd);
Line 1328... Line 1370...
1328
			    /* Check room for perpendicular labels. */
1370
			    /* Check room for perpendicular labels. */
1329
			    if (Rf_gpptr(dd)->las == 1 ||
1371
			    if (Rf_gpptr(dd)->las == 1 ||
1330
				Rf_gpptr(dd)->las == 2 ||
1372
				Rf_gpptr(dd)->las == 2 ||
1331
				tnew - tlast >= gap) {
1373
				tnew - tlast >= gap) {
1332
				GMtext(CHAR(label), side, axis_lab, 0, y,
1374
				GMtext(CHAR(label), side, axis_lab, 0, y,
1333
				       Rf_gpptr(dd)->las, dd);
1375
				       Rf_gpptr(dd)->las, padjval, dd);
1334
				tlast = temp + 0.5 *labw;
1376
				tlast = temp + 0.5 *labw;
1335
			    }
1377
			    }
1336
			}
1378
			}
1337
		    }
1379
		    }
1338
		}
1380
		}
1339
	    }
1381
	    }
1340
	}
1382
	}
1341
	break;
1383
	break;
1342
    } /* end  switch(side, ..) */
1384
    } /* end  switch(side, ..) */
1343
    UNPROTECT(4); /* lab, vfont, at, lab again */
1385
    UNPROTECT(5); /* lab, vfont, at, lab, padj again */
1344
    GMode(0, dd);
1386
    GMode(0, dd);
1345
    GRestorePars(dd);
1387
    GRestorePars(dd);
1346
    /* NOTE: only record operation if no "error"  */
1388
    /* NOTE: only record operation if no "error"  */
1347
    if (GRecording(call))
1389
    if (GRecording(call))
1348
	recordGraphicOperation(op, originalArgs, dd);
1390
	recordGraphicOperation(op, originalArgs, dd);
Line 2290... Line 2332...
2290
	 vfont = NULL,
2332
	 vfont = NULL,
2291
	 ...) */
2333
	 ...) */
2292
 
2334
 
2293
SEXP do_mtext(SEXP call, SEXP op, SEXP args, SEXP env)
2335
SEXP do_mtext(SEXP call, SEXP op, SEXP args, SEXP env)
2294
{
2336
{
2295
    SEXP text, side, line, outer, at, adj, cex, col, font, vfont, string;
2337
    SEXP text, side, line, outer, at, adj, padj, cex, col, font, vfont, string;
2296
    SEXP rawcol;
2338
    SEXP rawcol;
2297
    int ntext, nside, nline, nouter, nat, nadj, ncex, ncol, nfont;
2339
    int ntext, nside, nline, nouter, nat, nadj, npadj, ncex, ncol, nfont;
2298
    Rboolean dirtyplot = FALSE, gpnewsave = FALSE, dpnewsave = FALSE;
2340
    Rboolean dirtyplot = FALSE, gpnewsave = FALSE, dpnewsave = FALSE;
2299
    Rboolean vectorFonts = FALSE;
2341
    Rboolean vectorFonts = FALSE;
2300
    int i, n, fontsave, colsave;
2342
    int i, n, fontsave, colsave;
2301
    double cexsave;
2343
    double cexsave;
2302
    SEXP originalArgs = args;
2344
    SEXP originalArgs = args;
Line 2353... Line 2395...
2353
    nadj = length(adj);
2395
    nadj = length(adj);
2354
    if (nadj <= 0) errorcall(call, "zero length \"adj\" specified");
2396
    if (nadj <= 0) errorcall(call, "zero length \"adj\" specified");
2355
    if (n < nadj) n = nadj;
2397
    if (n < nadj) n = nadj;
2356
    args = CDR(args);
2398
    args = CDR(args);
2357
 
2399
 
-
 
2400
    /* Arg6b : padj= */
-
 
2401
    PROTECT(padj = coerceVector(CAR(args), REALSXP));
-
 
2402
    npadj = length(padj);
-
 
2403
    if (npadj <= 0) errorcall(call, "zero length \"padj\" specified");
-
 
2404
    if (n < npadj) n = npadj;
-
 
2405
    args = CDR(args);    
-
 
2406
    
2358
    /* Arg7 : cex */
2407
    /* Arg7 : cex */
2359
    PROTECT(cex = FixupCex(CAR(args), 1.0));
2408
    PROTECT(cex = FixupCex(CAR(args), 1.0));
2360
    ncex = length(cex);
2409
    ncex = length(cex);
2361
    if (ncex <= 0) errorcall(call, "zero length \"cex\" specified");
2410
    if (ncex <= 0) errorcall(call, "zero length \"cex\" specified");
2362
    if (n < ncex) n = ncex;
2411
    if (n < ncex) n = ncex;
Line 2410... Line 2459...
2410
    GMode(1, dd);
2459
    GMode(1, dd);
2411
 
2460
 
2412
    for (i = 0; i < n; i++) {
2461
    for (i = 0; i < n; i++) {
2413
	double atval = REAL(at)[i%nat];
2462
	double atval = REAL(at)[i%nat];
2414
	double adjval = REAL(adj)[i%nadj];
2463
	double adjval = REAL(adj)[i%nadj];
-
 
2464
	double padjval = REAL(padj)[i%npadj];
2415
	double cexval = REAL(cex)[i%ncex];
2465
	double cexval = REAL(cex)[i%ncex];
2416
	double lineval = REAL(line)[i%nline];
2466
	double lineval = REAL(line)[i%nline];
2417
	int outerval = INTEGER(outer)[i%nouter];
2467
	int outerval = INTEGER(outer)[i%nouter];
2418
	int sideval = INTEGER(side)[i%nside];
2468
	int sideval = INTEGER(side)[i%nside];
2419
	int fontval = INTEGER(font)[i%nfont];
2469
	int fontval = INTEGER(font)[i%nfont];
Line 2429... Line 2479...
2429
	if (isNAcol(rawcol, i, ncol))
2479
	if (isNAcol(rawcol, i, ncol))
2430
	    Rf_gpptr(dd)->col = colsave;
2480
	    Rf_gpptr(dd)->col = colsave;
2431
	else
2481
	else
2432
	    Rf_gpptr(dd)->col = colval;
2482
	    Rf_gpptr(dd)->col = colval;
2433
	Rf_gpptr(dd)->adj = ComputeAdjValue(adjval, sideval, Rf_gpptr(dd)->las);
2483
	Rf_gpptr(dd)->adj = ComputeAdjValue(adjval, sideval, Rf_gpptr(dd)->las);
-
 
2484
	padjval = ComputePAdjValue(padjval, sideval, Rf_gpptr(dd)->las);
2434
	atval = ComputeAtValue(atval, Rf_gpptr(dd)->adj, sideval, Rf_gpptr(dd)->las,
2485
	atval = ComputeAtValue(atval, Rf_gpptr(dd)->adj, sideval, Rf_gpptr(dd)->las,
2435
			       outerval, dd);
2486
			       outerval, dd);
2436
 
2487
 
2437
	if (vectorFonts) {
2488
	if (vectorFonts) {
2438
	    string = STRING_ELT(text, i%ntext);
2489
	    string = STRING_ELT(text, i%ntext);
2439
#ifdef GMV_implemented
2490
#ifdef GMV_implemented
2440
	    if(string != NA_STRING)
2491
	    if(string != NA_STRING)
2441
		GMVText(CHAR(string),
2492
		GMVText(CHAR(string),
2442
			INTEGER(vfont)[0], INTEGER(vfont)[1],
2493
			INTEGER(vfont)[0], INTEGER(vfont)[1],
2443
			sideval, lineval, outerval, atval,
2494
			sideval, lineval, outerval, atval,
2444
			Rf_gpptr(dd)->las, dd);
2495
			Rf_gpptr(dd)->las, padjval, dd);
2445
#else
2496
#else
2446
	    warningcall(call,"Hershey fonts not yet implemented for mtext()");
2497
	    warningcall(call,"Hershey fonts not yet implemented for mtext()");
2447
	    if(string != NA_STRING)
2498
	    if(string != NA_STRING)
2448
		GMtext(CHAR(string), sideval, lineval, outerval, atval,
2499
		GMtext(CHAR(string), sideval, lineval, outerval, atval,
2449
		       Rf_gpptr(dd)->las, dd);
2500
		       Rf_gpptr(dd)->las, padjval, dd);
2450
#endif
2501
#endif
2451
	}
2502
	}
2452
	else if (isExpression(text))
2503
	else if (isExpression(text))
2453
	    GMMathText(VECTOR_ELT(text, i%ntext),
2504
	    GMMathText(VECTOR_ELT(text, i%ntext),
2454
		       sideval, lineval, outerval, atval, Rf_gpptr(dd)->las, dd);
2505
		       sideval, lineval, outerval, atval, Rf_gpptr(dd)->las, 
-
 
2506
		       padjval, dd);
2455
	else {
2507
	else {
2456
	    string = STRING_ELT(text, i%ntext);
2508
	    string = STRING_ELT(text, i%ntext);
2457
	    if(string != NA_STRING)
2509
	    if(string != NA_STRING)
2458
		GMtext(CHAR(string), sideval, lineval, outerval, atval,
2510
		GMtext(CHAR(string), sideval, lineval, outerval, atval,
2459
		       Rf_gpptr(dd)->las, dd);
2511
		       Rf_gpptr(dd)->las, padjval, dd);
2460
	}
2512
	}
2461
 
2513
 
2462
	if (outerval == 0) dirtyplot = TRUE;
2514
	if (outerval == 0) dirtyplot = TRUE;
2463
    }
2515
    }
2464
    GMode(0, dd);
2516
    GMode(0, dd);
Line 2466... Line 2518...
2466
    GRestorePars(dd);
2518
    GRestorePars(dd);
2467
    if (!dirtyplot) {
2519
    if (!dirtyplot) {
2468
	Rf_gpptr(dd)->new = gpnewsave;
2520
	Rf_gpptr(dd)->new = gpnewsave;
2469
	Rf_dpptr(dd)->new = dpnewsave;
2521
	Rf_dpptr(dd)->new = dpnewsave;
2470
    }
2522
    }
2471
    UNPROTECT(10);
2523
    UNPROTECT(11);
2472
 
2524
 
2473
    /* NOTE: only record operation if no "error"  */
2525
    /* NOTE: only record operation if no "error"  */
2474
    if (GRecording(call))
2526
    if (GRecording(call))
2475
	recordGraphicOperation(op, originalArgs, dd);
2527
	recordGraphicOperation(op, originalArgs, dd);
2476
    return R_NilValue;
2528
    return R_NilValue;
Line 2600... Line 2652...
2600
	    hpos = GConvertX(adj, NPC, USER, dd);
2652
	    hpos = GConvertX(adj, NPC, USER, dd);
2601
	    where = 0;
2653
	    where = 0;
2602
	}
2654
	}
2603
	if (isExpression(sub))
2655
	if (isExpression(sub))
2604
	    GMMathText(VECTOR_ELT(sub, 0), 1, vpos, where,
2656
	    GMMathText(VECTOR_ELT(sub, 0), 1, vpos, where,
2605
		       hpos, 0, dd);
2657
		       hpos, 0, 0.0, dd);
2606
	else {
2658
	else {
2607
	    n = length(sub);
2659
	    n = length(sub);
2608
	    for (i = 0; i < n; i++) {
2660
	    for (i = 0; i < n; i++) {
2609
		string = STRING_ELT(sub, i);
2661
		string = STRING_ELT(sub, i);
2610
		if(string != NA_STRING)
2662
		if(string != NA_STRING)
2611
		    GMtext(CHAR(string), 1, vpos, where, hpos, 0, dd);
2663
		    GMtext(CHAR(string), 1, vpos, where, hpos, 0, 0.0, dd);
2612
	    }
2664
	    }
2613
	}
2665
	}
2614
    }
2666
    }
2615
    if (xlab != R_NilValue) {
2667
    if (xlab != R_NilValue) {
2616
	cex = Rf_gpptr(dd)->cexlab;
2668
	cex = Rf_gpptr(dd)->cexlab;
Line 2632... Line 2684...
2632
	    hpos = GConvertX(adj, NPC, USER, dd);
2684
	    hpos = GConvertX(adj, NPC, USER, dd);
2633
	    where = 0;
2685
	    where = 0;
2634
	}
2686
	}
2635
	if (isExpression(xlab))
2687
	if (isExpression(xlab))
2636
	    GMMathText(VECTOR_ELT(xlab, 0), 1, vpos, where,
2688
	    GMMathText(VECTOR_ELT(xlab, 0), 1, vpos, where,
2637
		       hpos, 0, dd);
2689
		       hpos, 0, 0.0, dd);
2638
	else {
2690
	else {
2639
	    n = length(xlab);
2691
	    n = length(xlab);
2640
	    for (i = 0; i < n; i++) {
2692
	    for (i = 0; i < n; i++) {
2641
		string = STRING_ELT(xlab, i);
2693
		string = STRING_ELT(xlab, i);
2642
		if(string != NA_STRING)
2694
		if(string != NA_STRING)
2643
		    GMtext(CHAR(string), 1, vpos + i, where, hpos, 0, dd);
2695
		    GMtext(CHAR(string), 1, vpos + i, where, hpos, 0, 0.0, dd);
2644
	    }
2696
	    }
2645
	}
2697
	}
2646
    }
2698
    }
2647
    if (ylab != R_NilValue) {
2699
    if (ylab != R_NilValue) {
2648
	cex = Rf_gpptr(dd)->cexlab;
2700
	cex = Rf_gpptr(dd)->cexlab;
Line 2664... Line 2716...
2664
	    hpos = GConvertY(adj, NPC, USER, dd);
2716
	    hpos = GConvertY(adj, NPC, USER, dd);
2665
	    where = 0;
2717
	    where = 0;
2666
	}
2718
	}
2667
	if (isExpression(ylab))
2719
	if (isExpression(ylab))
2668
	    GMMathText(VECTOR_ELT(ylab, 0), 2, vpos, where,
2720
	    GMMathText(VECTOR_ELT(ylab, 0), 2, vpos, where,
2669
		       hpos, 0, dd);
2721
		       hpos, 0, 0.0, dd);
2670
	else {
2722
	else {
2671
	    n = length(ylab);
2723
	    n = length(ylab);
2672
	    for (i = 0; i < n; i++) {
2724
	    for (i = 0; i < n; i++) {
2673
		string = STRING_ELT(ylab, i);
2725
		string = STRING_ELT(ylab, i);
2674
		if(string != NA_STRING)
2726
		if(string != NA_STRING)
2675
		    GMtext(CHAR(string), 2, vpos - i, where, hpos, 0, dd);
2727
		    GMtext(CHAR(string), 2, vpos - i, where, hpos, 0, 0.0, dd);
2676
	    }
2728
	    }
2677
	}
2729
	}
2678
    }
2730
    }
2679
    GMode(0, dd);
2731
    GMode(0, dd);
2680
    GRestorePars(dd);
2732
    GRestorePars(dd);
2681
    /* NOTE: only record operation if no "error"  */
2733
    /* NOTE: only record operation if no "error"  */
2682
    if (GRecording(call))
2734
    if (GRecording(call))
2683
	recordGraphicOperation(op, originalArgs, dd);
2735
	recordGraphicOperation(op, originalArgs, dd);
2684
    return R_NilValue;
2736
    return R_NilValue;
2685
}
2737
}/* do_title */
2686
 
2738
 
2687
 
2739
 
2688
/*  abline(a, b, h, v, col, lty, lwd, ...)
2740
/*  abline(a, b, h, v, col, lty, lwd, ...)
2689
    draw lines in intercept/slope form.	 */
2741
    draw lines in intercept/slope form.	 */
2690
 
2742
 
Line 2900... Line 2952...
2900
    GRestorePars(dd);
2952
    GRestorePars(dd);
2901
    /* NOTE: only record operation if no "error"  */
2953
    /* NOTE: only record operation if no "error"  */
2902
    if (GRecording(call))
2954
    if (GRecording(call))
2903
	recordGraphicOperation(op, originalArgs, dd);
2955
	recordGraphicOperation(op, originalArgs, dd);
2904
    return R_NilValue;
2956
    return R_NilValue;
2905
}
2957
}/* do_title */
2906
 
2958
 
2907
SEXP do_box(SEXP call, SEXP op, SEXP args, SEXP env)
2959
SEXP do_box(SEXP call, SEXP op, SEXP args, SEXP env)
2908
{
2960
{
2909
/*     box(which="plot", lty="solid", ...)
2961
/*     box(which="plot", lty="solid", ...)
2910
       --- which is coded, 1 = plot, 2 = figure, 3 = inner, 4 = outer.
2962
       --- which is coded, 1 = plot, 2 = figure, 3 = inner, 4 = outer.