1
$\begingroup$

Basically, this is the plot that comes out when I choose

Frame -> True

Due to my need of labeling the axes. Is there a way to get rid off of that annoying gap?

Here is the figure

enter image description here

Here is the code (it won't work because you did not define the functions I used). Just, please, tell me how to solve it (I guess it does occur independently upon the function I plot).

LogLinearPlot[{L[0.25], L[0.5], L[0.75], L[1]}, {z, 0.1, 10}, 
PlotRange -> {0, 2},
PlotRangePadding -> 0, 
PlotStyle -> {{Black}, {Black, Dotted}, {Black, Dashed}, {Black, 
DotDashed}}, LabelStyle -> {FontSize -> 13}, AxesStyle -> Bold, 
Frame -> True,  FrameLabel -> {Log[t], Subscript[Ein, \[Nu]][t]}]
$\endgroup$
  • 3
    $\begingroup$ Use PlotRange->{{0.1, 2}, {0,2}} to control the x and y ranges independenty. $\endgroup$ – Carl Woll Jan 23 '17 at 18:40
  • 2
    $\begingroup$ @corey979 - even though OP didn't post a MWE, here is one: LogLinearPlot[x, {x, 0.1, 10}, Frame -> True] The annoying gap is the fact that the x-range of the plot extends to the left beyond the plotrange. Normally, you don't expect the x-range that's plotted to go beyond what is input. If you try that in version 11, it works the right way. For version 10, you have to use Carl's method. $\endgroup$ – Jason B. Jan 23 '17 at 18:45
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because the issue has been fixed in the latest version of Mathematica and a workaround is simple in other versions. $\endgroup$ – Feyre Jan 23 '17 at 19:23
  • 2
    $\begingroup$ Personally I'd rather someone edit the question to make it self-contained. If the minimum example I mentioned above really does describe the problem, it can be used. There are plenty of questions on here that don't apply to the latest version, and are useful for people searching in the future. The solution is simple, but not necessarily obvious. My first fix was to use a negative value for the PlotRangePadding, an obvious hack. Then I saw Carl's response and smacked my forehead $\endgroup$ – Jason B. Jan 23 '17 at 19:46
  • 2
    $\begingroup$ @JasonB Another recent related question: mathematica.stackexchange.com/q/135719/121 -- I am inclined to agree we should make a canonical post about this as it seems to come up fairly often. $\endgroup$ – Mr.Wizard Jan 24 '17 at 9:19

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.