Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This code

e12 = {10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, 100};
l12 = Log[e12];
l12m = Log[e12 0.9];
l12p = Log[e12 1.1];
LogLinearPlot[{}, {r, 10, 100}, Axes -> {True, False}, Ticks -> {e12},
  PlotRange -> {0, 80},
  Epilog ->  {{Table[{Dashed, Line[{{l12[[r1]], 0}, {l12[[r1]], 100}}]}, {r1, 1, 13}]},
    {Table[{Line[{{l12m[[r1]], 5 + 5 r1}, {l12p[[r1]], 5 + 5 r1}}]}, {r1, 1, 13}]},
    {Table[{Blue, Line[{{l12m[[r1]], 2}, {l12p[[r1]], 2}}]}, {r1, 1, 13}]},
    {Table[{Line[{{l12m[[r1]], 3.75 + 5 r1}, {l12m[[r1]], 6.25 + 5 r1}}]}, {r1, 1, 13}]},
    {Table[{Line[{{l12p[[r1]], 3.75 + 5 r1}, {l12p[[r1]], 6.25 + 5 r1}}]}, {r1, 1, 13}]}
  }]

gives me this plot:

enter image description here

Any idea why it's so small?

share|improve this question
    
In version 7 I get no errors and a plot of normal dimension. What version are you using? Presumably your empty-body usage wasn't designed for. Try plotting something but styling it white or transparent. –  Mr.Wizard Dec 23 '13 at 10:22
    
@Mr.Wizard - I'm using version 9. I'm not sure I understand what you mean by "try plotting something...". –  Geert Goeteyn Dec 23 '13 at 10:27
1  
In version 9 I have no problem either. To increase the size of the plot you can add the option "ImageSize". –  Kardashev3 Dec 23 '13 at 10:28
1  
I meant that you are not plotting anything in the body of LogLinearPlot; you are only using it ancillary fashion get logarithmic scaling. Possibly using e.g. LogLinearPlot[10, {r, 10, 100}, PlotStyle -> Transparent, . . . will help. Since I don't have the problem I can't test it, and since Kardashev3 also does not have the problem this might have to do with your local configuration. –  Mr.Wizard Dec 23 '13 at 10:45
    
I get an error: "ListQ::argx: ListQ called with 0 arguments; 1 argument is expected. >>" (version 9.0.1 on MacOS X 10.90 –  cormullion Dec 23 '13 at 15:47

1 Answer 1

up vote 2 down vote accepted

Use Sequence @@ {} and not {} and the size of the image can be controlled using ImageSize. Also look at ImageMargins and ImagePadding for more control of layout

e12 = {10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, 100};
l12 = Log[e12];
l12m = Log[e12 0.9];
l12p = Log[e12 1.1];
LogLinearPlot[Sequence @@ {}, {r, 10, 100}, Axes -> {True, False}, 
 Ticks -> {e12}, PlotRange -> {0, 80}, 
 Epilog -> {{Table[{Dashed, 
      Line[{{l12[[r1]], 0}, {l12[[r1]], 100}}]}, {r1, 1, 
      13}]}, {Table[{Line[{{l12m[[r1]], 5 + 5 r1}, {l12p[[r1]], 
         5 + 5 r1}}]}, {r1, 1, 13}]}, {Table[{Blue, 
      Line[{{l12m[[r1]], 2}, {l12p[[r1]], 2}}]}, {r1, 1, 
      13}]}, {Table[{Line[{{l12m[[r1]], 3.75 + 5 r1}, {l12m[[r1]], 
         6.25 + 5 r1}}]}, {r1, 1, 
      13}]}, {Table[{Line[{{l12p[[r1]], 3.75 + 5 r1}, {l12p[[r1]], 
         6.25 + 5 r1}}]}, {r1, 1, 13}]}}, ImageSize -> 500]

Mathematica graphics

share|improve this answer
    
Let run r like {r, 9, 105} to have all bars fully shown at the margins. –  Kardashev3 Dec 23 '13 at 10:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.