Re: PlotLegends bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg98413] Re: PlotLegends bug?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 9 Apr 2009 05:54:38 -0400 (EDT)
- Organization: Uni Leipzig
- References: <grhp55$mfa$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
let me guess, you are using Mathematica 6.0 with the broken PNG export ?
Just save TIF or an other bitmap format and it will work.
Regards
Jens
Serych Jakub wrote:
> I wanted to export some ListLogLinearPlots with legends (using =
> PlotLegends
> package) as images today, but Mathematica exports just blank images (on
> display the images are OK). Here is example code (in reality I have more
> curves in one image so I realy need the legends):
> Needs["PlotLegends`"]
> data = {{16.`, -24.`}, {20.`, -23.`}, {25.`, -22.`}, {31.5`, -21.`}, \
> {40.`, -20.`}, {50.`, -20.`}, {63.`, -19.`}, {80.`, -18.`}, {100.`, \
> -13.`}, {125.`, -12.`}, {160.`, -10.`}, {200.`, -8.`}, {250.`, -6.`}, \
> {315.`, -5.`}, {400.`, -3.`}, {500.`, -2.`}, {630.`, -1.`}, {800.`, \
> -0.5`}, {1000.`,
> 0.`}, {1250.`, -0.5`}, {1600.`, -0.5`}, {2000.`, -1.`}, {2500.`, \
> -1.5`}, {3150.`, -2.5`}, {4000.`, -3.5`}, {5000.`, -5.`}, {6300.`, \
> -6.5`}, {8000.`, -8.`}, {10000.`, -10.`}, {12500.`, -12.`}, {16000.`, \
> -14.`}, {20000.`, -15.`}, {25000.`, -17.`}, {31500.`, -19.`}, \
> {40000.`, -20.`}, {50000.`, -21.`}, {63000.`, -22.`}, {80000.`, \
> -23.`}, {100000.`, -24.`}};
> image = ListLogLinearPlot[data,
> Joined -> True,
> InterpolationOrder -> 2,
> GridLines -> Automatic,
> LegendPosition -> {1.1, -0.4},
> AxesLabel -> {Style["f [Hz]", Bold, 18],
> Style["\!\(\*SubscriptBox[\"A\", \"u\"]\) [dB]", Bold, 18]},
> LabelStyle -> Medium,
> PlotLegend -> Style["data", Bold, 18],
> PlotStyle -> Thick,
> LegendSize -> 0.5,
> ImageSize -> {1000, 600}]
> Export["image.png", image]
>
> If I comment out all the options related to PlotLegends, the Export =
> works
> just fine:
>
> image = ListLogLinearPlot[data,
> Joined -> True,
> InterpolationOrder -> 2,
> GridLines -> Automatic,
> (*LegendPosition->{1.1,-0.4},*)
> AxesLabel -> {Style["f [Hz]", Bold, 18],
> Style["\!\(\*SubscriptBox[\"A\", \"u\"]\) [dB]", Bold, 18]},
> LabelStyle -> Medium,
> (*PlotLegend->Style["data",Bold,18],*)
> PlotStyle -> Thick,
> (*LegendSize->0.5,*)
> ImageSize -> {1000, 600}]
> Export["image.png", image]
>
> Also it is not possible to Ctrl-C the image from the screen and paste it =
> to
> the image editor (the pasted result is also blank).
> Does somebody see any bug in my code or there is the bug in PlotLegends
> package?
>
> Thanks in advance for any help
>
> Jakub
>