Method: PLplot.plot3d

Defined in:
ext/rbplplot.c

.plot3d(x, y, z, opt = nil, clevel = nil) ⇒ nil .plot3dc(x, y, z, opt = nil, clevel = nil) ⇒ nil

If clevel is true (or non-zero Fixnum), draw sides (same as including PL::DRAW_SIDES in opt), but not contours. If clevel is false (or zero Fixnum), do not draw sides (even if opt includes PL::DRAW_SIDES) and do not draw contours. Otherwise, sides are drawn if PL::DRAW_SIDES is in opt and contours are drawn at the levels specified in clevel if it is non-nil.

Overloads:

  • .plot3d(x, y, z, opt = nil, clevel = nil) ⇒ nil

    Returns:

    • (nil)
  • .plot3dc(x, y, z, opt = nil, clevel = nil) ⇒ nil

    Returns:

    • (nil)


1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
# File 'ext/rbplplot.c', line 1286

static VALUE
rb_plplot_plot3d(int argc, VALUE *argv, VALUE mod)
{
  int opt;
  VALUE vc;

  if(argc > 4) {
    opt = NUM2INT(argv[3]);
    vc = argv[4];

    if(TYPE(vc) == T_FIXNUM)
      vc = (vc == Qzero) ? Qfalse : Qtrue;

    if(vc == Qtrue) {
      opt |= DRAW_SIDES;
      argv[3] = INT2NUM(opt);
      argv[4] = Qnil;
    } else if(vc == Qfalse) {
      opt &= ~DRAW_SIDES;
      argv[3] = INT2NUM(opt);
      argv[4] = Qnil;
    }
  }

  plplot_pl3d(argc, argv, 'p');

  return Qnil;
}