MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Help on drawing intervals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82897] Re: Help on drawing intervals
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 2 Nov 2007 05:03:15 -0500 (EST)
  • References: <fgc9h4$8h9$1@smc.vnet.net>


Hi,

you could draw a left bracket at 2n, a vertical line  at 2n+1 and join 

both by  a horizontal line. The following works fine in version 6. For 

older versions you will need a Show statement and eventually scale the 

graphics to get a pleasing height/width:

del=0.3; bar=1;

c1=Table[2n,{n,-10,10}];

c2=Table[2n+1,{n,-10,10}];

leftBracket[x_]:=Line[{{x+del,-bar},{x,-bar},{x,bar},{x+del,bar}}];

horLine[x_]:=Line[{{x,-bar},{x,bar}}];

vertLine[x1_,x2_]:=Line[{{x1,0},{x2,0}}];



Graphics[{

leftBracket /@ c1 ,

horLine/@ c2,

MapThread[vertLine,{c1,c2}]

}]



hope this helps, Daniel



polymedes wrote:

> How can I visualize the intervals [2n, 2n+1) for n=-10 to 10 in

> mathematica? Any help would be much appreciated

> 

> 




  • Prev by Date: Re: Converting a number back to a symbol?
  • Next by Date: Re: NumberPadding on the left
  • Previous by thread: Help on drawing intervals
  • Next by thread: Re: Help on drawing intervals