2
$\begingroup$

I would like add parallel line to $x$ axis to emphasize that part is longer than it appears. See the figure I added (highlited part).

enter image description here

Additional request: Is it possible get longer ticks?

Here is my MWE:

f1[i_] := 2883.03 + (27645.2 i^0.993489)/(0.248356 + i^0.993489)

ticks = {

   {Table[{10^(3 + i), Superscript[10, 3 + i]}, {i, 0.4, 1.8, 0.3}], 
    None},

   {{{10^-4, 0}, {10^-3, Spacer@0}, {10^-2, 
      Superscript[10, -2]}, {10^-1, Spacer@0}, {10^0, 
      Superscript[10, 0]}, {10^1, ""}, {10^2, Superscript[10, 2]}}, 
    None}

   };

LogLogPlot[f1[i], {i, 10^-4, 100}, Frame -> True, 
 PlotRange -> {{10^-4.2, 130}, {10^3.35, 10^4.6}}, 
 FrameStyle -> Directive[Black, Thick], 
 FrameTicksStyle -> Directive[Black, Thick, 27], FrameTicks -> ticks, 
 PlotStyle -> Directive[Purple, AbsoluteThickness@2.7], 
 ImageSize -> 600]

enter image description here

$\endgroup$
  • $\begingroup$ The numbers on the x axis are 0, 0.01, 1, 100 in equal intervals. The segment you note is definitely not larger. Do you mean that the segment between 1 and 100 is longer? At any rate, I am in favour of equal intervals in axes. $\endgroup$ – Titus Nov 16 '18 at 16:13
  • $\begingroup$ Thanks for the comment. No segment between 0 and 0.001 is longer. Since we can't take Log[0], I placed 0 at 10^-4 and will cut the x-axis. $\endgroup$ – OkkesDulgerci Nov 16 '18 at 17:09
2
$\begingroup$

To make ticks longer:

ticks2 = ticks /. {a_?NumericQ, b_} :> {a, b, {.02, 0}};

To create an inset that gives the desired look:

arrowhead = Graphics[{ EdgeForm[None], FaceForm[White], 
  Polygon[{{-1, -1}, {0, 1}, {1, 1}, {0, -1}}], Black, 
  CapForm["Butt"], AbsoluteThickness[2], 
  Line[{{{-1, -1}, {0, 1}}, {{0, -1}, {1, 1}}}]}];
inset[pos_: ImageScaled[{.2, .1}], size_: {1/2, 1/2}] := Inset[arrowhead, pos, 
  Automatic, size]

Use LogLogPlot with the options Method -> {"FrameInFront" -> False}, PlotRangeClipping -> False and Epilog -> inset[]:

llplot = LogLogPlot[f1[i], {i, 10^-4, 100}, Frame -> True, 
 PlotRange -> {{10^-4.2, 130}, {10^3.35, 10^4.6}}, 
 FrameStyle -> Directive[Black, Thick], 
 FrameTicksStyle -> Directive[Black, Thick, 27], FrameTicks -> ticks2,
 PlotStyle -> Directive[Purple, AbsoluteThickness@2.7], 
 ImageSize -> 600, Method -> {"FrameInFront" -> False}, 
 PlotRangeClipping -> False, Epilog -> inset[]]

enter image description here

You can also use arrowheads to "snip" part of the main plot:

llplot /. l_Line :> {Arrowheads[{{.015, .1, arrowhead /. Black -> Purple}}], Arrow @@ l}

enter image description here

$\endgroup$
2
$\begingroup$

You could use Graphics to create to symbol (//), and Overlay to superpose it to your plot.

   parallel = 
  Graphics[{Black, Thick, Line[{{0.300, 0}, {0.370, 0.1}}], 
    Line[{{0.350, 0}, {0.420, 0.1}}], White, AbsoluteThickness@6.1, 
    Line[{{0.325, 0}, {0.395, 0.1}}]}, ImageSize -> {30}, 
   ImageMargins -> {{105(*Control the horizontal position*), 
      0}, {23(*Control the vertical position*), 0}}];
Overlay[{LogLogPlot[f1[i], {i, 10^-4, 100}, Frame -> True, 
   PlotRange -> {{10^-4.2, 130}, {10^3.35, 10^4.6}}, 
   FrameStyle -> Directive[Black, Thick], 
   FrameTicksStyle -> Directive[Black, Thick, 27], 
   FrameTicks -> ticks, 
   PlotStyle -> Directive[Purple, AbsoluteThickness@2.7], 
   ImageSize -> 600], parallel (*Here comes the symbol*)}, 
 Alignment -> {Left, Bottom} (*To control its initial position*)]

For the longer ticks, I suggest the CustomTicks package. http://library.wolfram.com/infocenter/Demos/5599/

$\endgroup$

Your Answer

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

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