I'm using the CustomTicks
package, which is part of the LevelScheme
package, for styling the FrameTicks
in my plots. On some sides of the plot frame, I want to have FrameTicks
without tick labels. The problem is that I get extra white space in the place where the tick labels used to be. (Here, I have produced the plots with LightGray
background in order to highlight the cropping problem.)
Needs["CustomTicks`"]
plot = Plot[x, {x, 0, 1},
Frame -> True,
FrameTicks -> {LinTicks[0, 1, ShowTickLabels -> False],LinTicks[0, 1]},
Background -> LightGray
]
I think that the problem arises because the nonlabeled ticks are created as ""
, as can be seen in FullForm[plot]
. How can I achieve a result similar to Plot[x,{x,0,1},Frame->True]
, i.e., a tight cropping of the plot around its frame (see below) with customized FrameTicks
?
I do not want to rasterize my plot; thus, ImageCrop
is not an option.
Plot[x, {x, 0, 1},
Frame -> True,
Background -> LightGray
]