MathGroup Archive 1999

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

Search the Archive

Plots and text, Fontsize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19864] Plots and text, Fontsize
  • From: El alchemista <jaimeco at pecos.rc.arizona.edu>
  • Date: Sun, 19 Sep 1999 01:20:47 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi all:

I have this text file with a bunch of commands for mathematica. I
basically have two questions.

1 - I have defined some text in "te". I would like to increase the size
of the plus sign so I am using FontSize->24. When I run my file through
math, the size of the + sign does not change using such values as
FontSize-> 72 (1 inch). It does work when I read the file in
mathematica and save it as a notebook. Question: How can I force the
size command while running in line mode? Most of the time I do not ahve
access to an X-windows terminal so I have to work using the line
command (math).

2 - Plots and text. By the end of the file I would like to assign names
to the plots. in p1, p2 etc.  to each of the lines in the plots. Is
there a way to add text to a plot?  I would like to avoid the use of
plotlegend.


I would really appreciate your help or comments.

Thanks

  Flatten [{"new", Date []}] >> out   ;               Off
[General::spell1] ;

{ c[1] ,  c[2] ,  c[3] }   =   { - 41/10 ,  19/6 ,  7 }   ;      pi =
8Pi^2  ; { r[1] ,  r[2] ,  r[3] }   =   { 59 ,  29.6 ,  8.4 } / (4 Pi)
//  N    ; y[i_,s_]  :=  pi (4/s - r[i]) / c[i]  ;          r[i_,b_,x_]
:= x - c[i]b / pi

d4[b_,x_]  :=  Module [ { to1 = 17/20 , to2 = 9/4 , to3 = 8 }
,Evaluate [ 6 - (to1 / r[1,b,x] + to2 / r[2,b,x] + to3 / r[3,b,x])
r4[b] ] / (8 Pi^2) // N  ]

d5[b_,x_]  :=  Module[ { r54 = r5[b]/r4[b] ,  hi3=27/1600 ,  hi2=9/2,
hi1=4 } , Evaluate [ hi1 (4 + 2 r54 - r54^2)  -  hi2 ( .2 / r[1,b,x]
  +  1 / r[2,b,x]) r5[b]  +  hi3 ( 3 / r[1,b,x]^2  +  10 / (r[1,b,x]
r[2,b,x] )
			   +  25 / r[2,b,x]^2 )  r5[b]^2 ] / (8 Pi^2)
			   //
N  ]

Module [ { sa = 1.06 ,   sb = 1.26 ,      ya = 25  ,   yb = 35  ,   n =
19.01 ,
			 arto = arhi = {} ,  rowt ,  rowh ,  sys ,  v =
246 } , li[i_]   :=   Line [  { { sa, y[i,sa] }  ,   { sb, y[i, sb] }
}  ]   ;

te =  Text[StyleForm [ "+" ,  FontSize -> 24] ,  {1.18, 29} ]  ; t1 =
Text [ 1 , {1.18, 27} ]  ;                 h5 = Text [ 4 , {1.18, 31}
]  ; t2 = Text [ 2 , {1.18, 26} ]  ;                 h6 = Text [ 5 ,
{1.18, 32} ]  ; t3 = Text [ 3 , {1.18, 25} ]  ;                 h6 =
Text [ 6 , {1.18, 33} ]  ;

lin = Graphics[ { Dashing [{.01,.01}] , Thickness [.0016], li[1],
li[2], li[3], te,  t1, t2, (* t3, t4, t5, t6,  h1, h2, h3, h4, *) h5,
h6 } , AspectRatio -> .75 ,    PlotRange -> {ya,yb} ,  Frame -> True ]
;

m = { {sa,sb}, {ya,yb} }  ;   ds = (sb-sa)/n  ;    dy = (yb-ya)/n  ;

Do [ x = 4/s   ;      sys  =  NDSolve [ { r4'[bat] == d4[bat,x] ,
r4[0] == x , r5'[bat] == d5[bat,x] ,  r5[0] == x }  ,     {r4, r5}
,     {bat, ya, yb} ]  ; rowt = rowh = {} ;          Do [ {rt, rh} =
{r4[bat], r5[bat]} /.  First[sys]  ; AppendTo[ rowt, N [v / Sqrt[3/2
rt]] ] ; AppendTo[ rowh, N [v / Sqrt[rh/4]] ] , {bat,ya,yb,dy} ] ;
AppendTo[arto,rowt] ; AppendTo[arhi,rowh] , {s,sa,sb,ds}] ;

cto = ContourGraphics [ Transpose[arto] , MeshRange -> m , AspectRatio
->
.75 ,
		ContourStyle -> { Thickness[.0001] ,  Dashing
		[{.02,.06}]
}  , ContourShading -> False  ,                         Contours -> {
150, 160, 170, 175, 180, 185, 190, 220, 280 } ] ;


chi = ContourGraphics [ Transpose[arhi] , MeshRange -> m , AspectRatio
->
.75 ,
ContourStyle -> {Thickness[.0001]} ,  ContourShading -> False ,
Contours -> { 200, 210, 220, 225, 230, 235, 240, 280, 350 } ] ]  ;

xC = 4 / 1.18 ;   yC = 29 ;       sys  =  NDSolve [ { r4'[bat] ==
d4[bat,xC]  , r5'[bat] == d5[bat,xC], r4[0] == xC, r5[0] == xC} ,
{r4,r5}, {bat, 0, 30} ]  ;

baf[t_] := yC + .5 Log [E^(-2t) + E^(-2yC) ] ;      p1 = Text [r1,
{10,4.2} ] ; p2 = Text [ r2 , { 5, 2.6} ]  ;                 p3 = Text
[ r3 , {10, 1.4} ]  ; p4 = Text [ r4 , { 5, 1.8} ]  ;
p5 = Text [ r5 , {10, 5.5} ]  ;

pl  =  Plot [ { r[1, baf[t] , xC] ,   r[2, baf[t] , xC] ,   r[3, baf[t]
, xC] , r4 [baf[t]] /. sys  , r5 [baf[t]] /. sys } , {t, 0, 35} , Frame
-> True , AspectRatio -> .75   ,     PlotRange -> All   ,        Axes
-> False ]  ; Display [ "kkkk" , Show [lin, cto, chi] , "EPS" ,
ImageSize -> {999,750} ,
  ImageOffset -> {10,190} ,  ImageRotated -> True ]  ;

Display [ "aaaa", pl , "EPS" ,  ImageRotated -> True , ImageSize ->
{999,750} ,  ImageOffset -> {10,190} ]   ; Quit []


-- 
---

Jaime E. Combariza Ph. D.
Research Computing Group
http://pecos.rc.arizona.edu








  • Prev by Date: Re: F[f_,x_]:=f[x] ?
  • Next by Date: Re: Mathematica can't win against Tiger...
  • Previous by thread: thanks
  • Next by thread: Re: Mathematica can't win against Tiger...