Luigi, some things that you think should be simple are in fact hard in Mathematica. Below is an example you can adapt to your own problem. This code would be called with an example like: FrameTicks -> {tickFunction[0, 500, "Style" -> Integer], tickFunction[0, 6, "Style" -> Decimal], {}, {}}:
In[1]:= Options[tickFunction] = {"Style" -> Automatic}
Out[1]= {"Style" -> Automatic}
In[2]:= Options[tickLabelStyleFunction] = {"Style" -> Automatic}
Out[2]= {"Style" -> Automatic}
In[3]:= tickLabelStyleFunction[value : _, opts : OptionsPattern[]] :=
Switch[
OptionValue["Style"],
Automatic,
value,
Integer,
IntegerPart[value],
Decimal,
NumberForm[value, {2, 1}]
]
In[4]:= tickFunction[start : _, stop : _, opts : OptionsPattern[]] :=
Map[
Function[
value,
{value,
tickLabelStyleFunction[value,
FilterRules[{opts}, Options[tickLabelStyleFunction]]],
{0, 0.02},
{Directive[Thickness[0.005]]}
}
],
N@FindDivisions[{start, stop}, 5]
]
________________________________________
From: Luigi B [
l.ba...@gmail.com]
Sent: Wednesday, January 04, 2012 05:06
Subject: Frameticks and ListLogLinearPlot