Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

PlotLegends bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98367] PlotLegends bug?
  • From: "Serych Jakub" <Serych at panska.cz>
  • Date: Wed, 8 Apr 2009 05:01:29 -0400 (EDT)

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


  • Prev by Date: Re: Fast Access to Installed Packages
  • Next by Date: Show[list] does not work - details of the script
  • Previous by thread: Re: Are there Arrow-like objects in 3D
  • Next by thread: Re: PlotLegends bug?