Re: Symbols & Legend Fonts in MultipleListPlot...
- To: mathgroup at smc.vnet.net
- Subject: [mg23379] Re: [mg23360] Symbols & Legend Fonts in MultipleListPlot...
- From: "Arturas Acus" <acus at itpa.lt>
- Date: Fri, 5 May 2000 02:07:12 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mark, the following excerpt may help You. In[2]:= <<Graphics`MultipleListPlot` << Graphics`Legend` In[4]:= $Version Out[4]:= "4.0 for Linux (April 21, 1999)" One can make circle with MakeSymbol command. However if You do that, then Aspect Ratio will be wrong: actually You will see elipses. I "fixed" this little bug (?) using RegularPolygon[] command with very large number of corners. Of course this slowns down rendering, otherwise it works well. You can also make symbols You would like. I use the "dagg" symbol below. I was able to adjust text style used in legend with StyleForm[] command, which can also change font family, etc. Here I changed only FontSize. See example below. In[5]:= ShowLegend[Show[Graphics[{Thickness[0.001], Line[{{1., 0.098425}, {0.6, 0.18}}], Text[" j={1/2,1/2,1}", {0.6, 0.18}, {-1, 0}, TextStyle -> {FontSlant -> Italic, FontSize -> 6}], Thickness[0.001], Line[{{0.5, 0.126286}, {0.4, 0.14}}], Text["j=1/2", {0.4, 0.14}, {1, -1}, TextStyle -> {FontSlant -> Italic, FontSize -> 6}], Thickness[0.001], Line[{{0.0126, 0.0597}, {0.04, 0.067}}], Text["j=1", {0.04, 0.067}, {-1, 0}, TextStyle -> {FontSlant -> Italic, FontSize -> 6}], Thickness[0.001], Line[{{0.02, 0.0455}, {0.05, 0.05}}], Text["j=3/2", {0.05, 0.05}, {-1, 0}, TextStyle -> {FontSlant -> Italic, FontSize -> 6}]}], Ticks -> {Automatic, Automatic}, PlotRange -> {{0, 2.05}, {0, 0.2}}, Frame -> True, FrameLabel -> {"\!\(Q\^2\)\!\(\((GeV/c)\)\^2\)", "\!\(G\_E\%n\)(\!\(Q\^2\))", "", ""}, RotateLabel -> True, ImageSize -> 360, DisplayFunction -> Identity], {{{Graphics[{AbsoluteThickness[0.1], Line[{{0, 0}, {1., 0}}]}], StyleForm["Quantum Skyrme model", FontSize -> 8]}, {Graphics[{Thickness[0.03], AbsoluteDashing[{0.9, 7, 7, 7}], Line[{{0, 0}, {1., 0}}]}], StyleForm["Semiclassical Skyrme", FontSize -> 8]}, {Graphics[{Thickness[0.03], AbsoluteDashing[{5, 5}], Line[{{0, 0}, {1., 0}}]}], StyleForm["Dipole Fit", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {{AbsolutePointSize[4], Point[#1]} & }, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {MakeSymbol[{Line[4*(MapAt[#1*N[1] & , #1, 2] & ) /@ {{0.75, 0.25}, {0.25, 0.25}, {0.25, 0.75}, {-0.25, 0.75}, {-0.25, 0.25}, {-0.75, 0.25}, {-0.75, -0.25}, {-0.25, -0.25}, {-0.25, -0.75}, {0.25, -0.75}, {0.25, -0.25}, {0.75, -0.25}, {0.75, 0.25}}]}]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {MakeSymbol[RegularPolygon[4, 4, 0]]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {PlotSymbol[Triangle, 6]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {MakeSymbol[RegularPolygon[3, 4]]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {MakeSymbol[RegularPolygon[500, 3]]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {MakeSymbol[RegularPolygon[4, 4, 0, Pi/4]]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}, {MultipleListPlot[{{0, 0}}, SymbolShape -> {PlotSymbol[Box, 3.5]}, DisplayFunction -> Identity, Axes -> False], StyleForm["Experiment [?]", FontSize -> 8]}}, LegendPosition -> {0.2, 0.07}, LegendSize -> {0.77, 0.5}, LegendTextSpace -> 3., LegendSpacing -> -0.12, LegendShadow -> None}, ImageSize -> 360] (* graphics deleted *) > Date: Thu, 4 May 2000 02:59:28 -0400 (EDT) > From: "Mark Harder" <harderm at ucs.orst.edu> To: mathgroup at smc.vnet.net > To: mathgroup at smc.vnet.net > Subject: [mg23379] [mg23360] Symbols & Legend Fonts in MultipleListPlot... > > I finally figured out how to create a list plot of multiple data, > with color encoding for the different data series, and a Legend > identifying the data by symbol & color-- by employing MultipleListPlot. > I also employed the DefaultFont directive (DefaultFont->{"Helvetica",10} > ) to set the default font. In Wickham-Jones, p.323, there is an example > of this usage, which also sets the font for the Legend descriptors. > However, in my case (Mathematica, v4.0; WinNTv.4.0) while axes numbers > are changed by DefaultFont, the Legend fonts are not changed & I can't > find any way to set the Legend fonts separately. How do I set my legend > fonts? The default ones are awfully small. > > Also, is there any way to get MultipleListPlot to recognize Circle > or Disk as valid point styles? It seems odd that it takes stars, > triangles, etc;, but not circles. > > By the way ?Legend returns a message that indicates that FontForm[] > can still be used, while the only entry for FontForm in the online docs > states that it was obsolete as of v. 3.0. I suspect the latter is true, > in which case the information for Legend should be corrected. Or, > correct me if I am wrong. > Regards, > mark e. harder > harderm at ucs.orst.edu > > > > Dr. Arturas Acus Institute of Theoretical Physics and Astronomy Gostauto 12, 2600,Vilnius Lithuania E-mail: acus at itpa.lt Fax: 370-2-225361 Tel: 370-2-612906