I stumbled upon a weird behaviour of Plot and ListLinePlot functions.
Let's plot a simple function
plot1 = Plot[Sin[x], {x, 0, 10}]
Now let's say I want to extract the "Ticks" element from the plot to later on manipulate it (a good example of manipulating ticks that I found very useful is here How can I scale tick marks without scaling my function? )
AbsoluteOptions[plot1, Ticks]
which gives me the ticks of the plot
(* {Ticks -> {{{0.,0., {0.00625, 0.}, {GrayLevel[0.],AbsoluteThickness[0.25]}}, .......*)
Now I plot the same function but add a frame
plot2 = Plot[Sin[x], {x, 0, 10}, Frame -> True]
but when I try to extract the Ticks element, they are gone!?
AbsoluteOptions[plot2, Ticks]
{Ticks -> {{}, {}}}
Unless I'm missing something (which is likely) this is very strange. I haven't found a fix for this issue and it's is a problem if you want to have nice graphs with frame labels etc and also want to manipulate the Ticks.
Any help/ideas/feedback is always appreciate it.
Edit
FrameTicks also return an empty list
AbsoluteOptions[plot2, FrameTicks]
(*{FrameTicks -> {{}, {}, {}, {}}}*)
AbsoluteOptions[plot2, FrameTicks]
fails withTicks::ticks: {Automatic,Automatic} is not a valid tick specification.
$\endgroup$ – Rohit Namjoshi Jan 19 at 17:40FullForm
onplot2
you can convince yourself thatplot2
des not contain the tick information but only:...Rule[Ticks, List[Automatic, Automatic]]...
$\endgroup$ – Daniel Huber Jan 19 at 21:47