Re: rotate frametick labels
- To: mathgroup at smc.vnet.net
- Subject: [mg59018] Re: rotate frametick labels
- From: Carsten Siegmund <carsten.siegmund at em.uni-karlsruhe.de>
- Date: Wed, 27 Jul 2005 01:24:40 -0400 (EDT)
- Organization: University of Karlsruhe, Germany
- References: <dc1su6$4up$1@smc.vnet.net> <dc4r1r$h2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
David's got a good idea using GridBox. The labels aren't rotated but
printed in column format:
testmatrix = Table[Hue[Random[]], {60}, {60}];
idlist = Table[{
i - 0.5, DisplayForm[
GridBox[Partition[Join[{Q}, IntegerDigits[1000 + 2i]], 1], \
RowSpacings -> 0]]}, {i, 1, 60}];
Show[Graphics[
{RasterArray[testmatrix]}],
AspectRatio -> Automatic,
Frame -> True,
FrameTicks -> {idlist, Automatic, None, None},
TextStyle -> {FontSize -> 10},
ImageSize -> 800];
Thanks,
Carsten
Carsten Siegmund wrote:
> David,
>
> thanks for your solution. It already looks like it should look like,
> but my arrays are too big, so that it seems quite complicated to define
> all the coordinates for labels manually.
>
> I analyse communication matrices each of the size between 60x60 and
> 100x100 and the labels on the x-axis indicate user-IDs (maximum length 5
> characters). My code looks like that:
>
> Show[Graphics[RasterArray[eigVectorsMatrixAdjCRCol]],
> Frame -> True,
> FrameTicks -> {frameDes, frameEigValuesMatrixAdjCRN,
> None, frameEigValuesMatrixAdjCRCumFreq},
> RotateLabel -> False,
> FrameLabel -> {"Userid", DisplayForm[SubscriptBox["λ", "j"]], None,
> DisplayForm[FractionBox[RowBox[{UnderscriptBox["Σ", "m<N"], \
> SubsuperscriptBox["λ", "j", "2"]}], RowBox[{UnderscriptBox["Σ", "N"],
> SubsuperscriptBox["λ", "j", "2"]}]]]}]
>
> The tables I use contain this data:
> eigVectorsMatrixAdjCRCol -> colour of each Eigenvector value (Hue[...])
> frameDes -> matrix description (user-IDs, 5 characters)
> frameEigValuesMatrixAdjCRN -> Eigenvalues
> frameEigValuesMatrixAdjCRCumFreq -> cumulated Eigenvalues
>
> Is there no way to make the FrameTicks-function work?
>
> Regards,
> Carsten
>
>
> David Park wrote:
>
>>Carsten,
>>
>>How about something like this.
>>
>>Show[Graphics[
>> {Rectangle[{0, 0}, {2, 1},
>> Show[Graphics[RasterArray[{{Hue[0.5], Hue[1]}}]],
>> AspectRatio -> Automatic, DisplayFunction -> Identity]],
>> Text["some text", {0.5, -0.05}, {0, 0.7}, {0, 1}],
>> Text["some more text", {1.5, -0.05}, {0, 0.7}, {0, 1}],
>> Text["Text Labeled Raster Array", {1, 1.1}]
>> }],
>> PlotRange -> {{-0.1, 2.1}, {-0.5, 1.3}},
>> AspectRatio -> Automatic,
>> Background -> Linen,
>> ImageSize -> 450
>> ];
>>
>>The labels might be better if they were at a slant, but then it takes some
>>finicky work to get them positioned correctly.
>>
>>This kind of labeling isn't too great because it takes up a lot of space and
>>there might be a better way if we knew what the labeling actually was.
>>
>>David Park
>>djmp at earthlink.net
>>http://home.earthlink.net/~djmp/
>>
>>
>>From: Carsten Siegmund [mailto:carsten.siegmund at em.uni-karlsruhe.de]
To: mathgroup at smc.vnet.net
>>
>>
>>Hi!
>>
>>I like to plot a raster array but for its elements it does not make
>>sense to be described by numbers. Therefore I've labeled the frameticks
>>manually and tried to rotate the labels to avoid overwriting for large
>>arrays.
>>
>>e.g.:
>>
>>Show[Graphics[RasterArray[{{Hue[0.5], Hue[1]}}]],
>> Frame -> True,
>> FrameTicks -> {{{0.5, StyleForm["some text",
>> FontVariations->{RotationAngle->90}]},
>> {1.5, StyleForm["some more text",
>> FontVariations->{RotationAngle->90}]},
>> None,None,None}
>>]
>>
>>I don't get any error messages but the plot looks the same as without
>>the use of StyleForm[...]. Any suggestions?
>>
>>Thanks,
>>Carsten
>>
>>[Mathematica 5.0, Windows XP Prof.]
>>
>>
>
>