Re: TextListPlot with colored texts

*To*: mathgroup at smc.vnet.net*Subject*: [mg73226] Re: TextListPlot with colored texts*From*: dh <dh at metrohm.ch>*Date*: Thu, 8 Feb 2007 03:36:42 -0500 (EST)*References*: <eqc7ht$s8l$1@smc.vnet.net>

Hi, by the way you specify fontcolor, you do it globally, that is for the whole plot. Hardly what you want. Thereby, if you combine plots, only one specification can be valid. Therefore, you must only color the labels used. This can e.g. be achieved by replacing the 3. data element by StyleForm[..]. E.g. if your data is in list1: list1={#[[1]],#[[2]],StyleForm[ToString[#[[3]]],FontColor->Red]}& /@ list1 Daniel dgokkaya at makek.dstb.uniud.it wrote: > Hi, > > I am new to use mathematica. I usually need to plot bar charts and > 2D-graphs. Recently, I have had a problem with plotting a graph. > > I am trying to plot a labeled 2D-graph with TextListPlot command. > I have 5 lists with {xi,yi,zi} pairs. "zi" values are standing for residue > numbers of a molecule starting from 1 to 67 (not a continuous serial, > there are some residues have no {xi,yi} data). > > My aim is to plot this 5 lists in the same graph, with > different colors-and/or-styles(bold,italic,underline) for the residue > numbers (zi-labels). > > For each list I did something like: > > plot1=TextListPlot[list1,TextStyle->{FontFamily->"Helvetica", > FontSize->14, FontSlant->"Italic", FontColor->Blue}, > PlotRange->{{...},{...}}, Frame->False, Axes->None] > > plot2, plot3, plot4 are written in the same way except with different > FontColors. The last list which is called FrameList has a frame and axes: > > FrameList=TextListPlot[list5, > TextStyle->{FontFamily->"Helvetica",FontSize->14,FontColor->Black},AxesOrigin->{...}, > PlotRange->{the same range}, Frame->True, FrameStyle->AbsoluteTickness[1], > FrameLabel->{"...","...", None, None}] > > Everthing goes well until this step. I have each plot with their own > labels with different colors-and/or-styles(bold,italic,underline). > > Afterwards, to see all these plots in the same graph I write: > > DisplayTogether[{plot1,plot2,plot3,plot4,FrameList}, > PlotRange->{the same range}, Frame->True, AxesOrigin->{the same values}, > FrameLabel->{StyleForm["...", FontFamily->"Helvetica", FontSize->32, > FontWeigth->"Bold", FontColor->Black], > StyleForm["...",FontFamily->"Helvetica", FontSize->32, > FontWeigth->"Bold", FontColor->Black],None,None}] > > > In the end, I see all labels (zi-residue numbers) in Blue and Italic, which > should be the situation only for list1 (plot1). I have tried several ways, > and looked at MathGroupArchive, I still could not solve the problem. > Different colors is working well with Plot and then PlotStyle command, but > I need to use TextListPlot and define colors for the Text. > > Looking forward to hearing for any advise. > > >