Re: Font size in plot coordinates?
- To: mathgroup at smc.vnet.net
- Subject: [mg92519] Re: Font size in plot coordinates?
- From: m.r at inbox.ru
- Date: Thu, 2 Oct 2008 04:37:28 -0400 (EDT)
- References: <gbt2qe$lda$1@smc.vnet.net> <gbulls$laj$1@smc.vnet.net>
Szabolcs wrote: > On Oct 1, 4:01 am, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de> > wrote: > > Hi, > > > > try: > > > > Graphics[{Text[Style["Fixed Size", FontSize -> 12], {1, 1}], > > > > Text[Style["Scaled Size", FontSize -> Scaled[0.1]], {0, 0}]}] > > > > and look what happen when you rescale the graphics. > > > > Hello, > > Thanks for the reply. I know about this, but I am looking for a way > to give the size in the same kind of coordinates we use for other > graphics objects, and not coordinates that depend on the plot range. > > Consider the following example: > > A = Text[Style["A", FontSize -> Scaled[0.4]], {0.5, 0}] > circle1 = Circle[{0, 0}, 1] > circle2 = Circle[{-2, 0}, 1/2] > > These two graphics look different even though they contain the same > objects: > > Graphics[{circle1, A}, Axes -> True] > Graphics[{circle1, circle2, A}, Axes -> True] > > I would like to fix the size of that letter "A" in a flexible way, so > that I won't have to keep the PlotRange constant in order to keep the > relative size of the text and circle constant. You can use Inset: A = Inset[ Graphics[Inset[Style["A", FontSize -> Scaled[1]]]], {.5, 0}, Automatic, 1]; circle1 = Circle[{0, 0}, 1]; circle2 = Circle[{-2, 0}, 1/2]; Graphics[{circle1, A}, Axes -> True] Graphics[{circle1, circle2, A}, Axes -> True] The width of the inset is always 1 (in plot range coordinates). I think you'll still have to use polygonization if you want more precise control over positioning and spacing. There was a thread a while ago about displaying stacked DNA letters. Maxim Rytin m.r at inbox.ru