Re: PlotLegends bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg98409] Re: PlotLegends bug?
- From: mike.honeychurch at gmail.com
- Date: Thu, 9 Apr 2009 05:53:53 -0400 (EDT)
- References: <grhp55$mfa$1@smc.vnet.net>
On Apr 8, 4:01 am, "Serych Jakub" <Ser... at panska.cz> 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 On OS X 10.5.6 your graphic rendered with a legend and I was able to right click and select "Copy Graphic" and paste the graphic into Preview. Export["image.png", image] also worked fine so maybe this is something platform specific. Mike