From: Eric B. <ej...@gm...> - 2017-02-13 21:09:28
|
Here's another way that may or may not be simpler than your polygon wxdraw2d(points_joined=true,point_type=0, line_width=3, points([[1,1],[1,4]]), xrange=[-2,2],yrange=[0,5]); Eric On Mon, Feb 13, 2017 at 3:52 PM Evan Cooch <eva...@gm...> wrote: > For a variety of reasons, I need to be able to plot a vertical line, wrt > to the horizontal axis, in a plot. For the life of me, I'm not sure how > to do this using wxdraw2d (or if its even possible). Suppose I want a > simply x-y plot, with a horizontal line at y=200 over all x, and a > vertical line at x=100 over all y. > > First, I call a few things, and set some defaults: > > load("draw")$ > > set_draw_defaults( > grid=true, > xaxis = true, yaxis = true, > xaxis_type = solid, yaxis_type = solid, > proportional_axes=xy)$ > > wxplot_size: [250, 250] $ > > wxdraw2d(x_voxel = 100, > y_voxel = 100, > line_width=2,color="black", > explicit(200,x,0,250), /* horizontal line */ > explicit(100,y,0,250)); /* vertical */; > > > But, this doesn't work. It seems that explicit within wxdraw2d must be a > function in x.If thats the case, then how the heck would you ever draw > something like...x=100 over all y? In other words, a vertical reference > line? The only way I could 'get something to work' seems like a kludge > -- using polygon: > > wxdraw2d( > line_width=2,color="black", > explicit(200,x,0,250), /* horizontal line */ > polygon([100,100],[0,250])); /* vertical */; > > Does the trick but...is there a better way that I'm missing? > > Thanks! > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |