1
$\begingroup$

I am trying to "fill to the axis" in a LogLinearPlot a function that has negative values, but I get the same filling as if I use "Bottom". The general rule (Filling->{Top, Bottom, Axis}) works fine if I build a table and plot it as ListLogLinearPlot, but I need to use a function. As an example, try:

LogLinearPlot[Sin[x],{x,0.01,10 Pi},Filling->Axis]

ListLogLinearPlot[Table[{x,Sin[x]},{x,0.01,10 Pi,0.05}],Filling->Axis, Joined->True]

I wonder if this is a bug in LogLinearPlot, which has fewer options than other plotting functions. Any solution?. Thanks.

$\endgroup$
  • 2
    $\begingroup$ Add in AxesOrigin -> {0.01, 0} (or wherever you want the axes origin) and it should work (for version 10.4.1 Windows 10). $\endgroup$ – JimB Oct 3 '17 at 17:38
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Oct 3 '17 at 19:02
  • $\begingroup$ ListLogLinearPlot[Table[{x,Sin[x]},{x,0.01,10 Pi,0.05}],Filling->Axis, Joined->True] works fine in 10.4 on a Mac. $\endgroup$ – David G. Stork Oct 3 '17 at 19:08
  • $\begingroup$ The bug was in LogLinearPlot[Sin[x],{x,0.01,10 Pi},Filling->Axis], not in ListLogLinearPlot[Table[{x,Sin[x]},{x,0.01,10 Pi,0.05}],Filling->Axis, Joined->True] and still is there in my Windows 10.4.0.0 version. $\endgroup$ – pedro andreo Aug 7 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.