How can I force the GridLines to be at the positions of the Tick marks? A simple code, FrameTicks -> Automatic and GridLines -> Automatic will do it, but not this code. The error must be in the function myTickList, but I didn't find it. Moreover, AspectRatio -> 1 seems not to work...
Result:

Input-File data.dat:
3542228.204 5433969.188
3542221.426 5433999.371
3 1 2 0
40
The code of the notebook:
inffile = OpenRead["data.dat"];
x1 = Read[inffile, Number]; y1 = Read[inffile, Number];
x2 = Read[inffile, Number]; y2 = Read[inffile, Number];
n1 = Read[inffile, Number]; n2 = Read[inffile, Number];
m1 = Read[inffile, Number]; m2 = Read[inffile, Number];
diff = Read[inffile, Number];
grad = Pi/2-ArcTan[y2 - y1, x2 - x1];
winkel=grad*180./Pi;
If[winkel < 0.0, winkel = winkel + 360.0];
s1 = ToString["Drehung erfolgt um "]; s2 = ToString[winkel];
s3 = ToString[" Grad "]; str = StringJoin[s1, s2, s3];
Style[str, FontSize -> 35, Italic, FontFamily -> "Helvetica"]
iend = n1 + n2 + 1;
Do[xkoor[i] = x1 - n2*diff + (i - 1)*diff, {i, 1, iend}]
jend = m1 + m2 + 1;
Do[ ykoor[j] = y1 + m1*diff - (j - 1)*diff, {j, 1, jend+1, 1}]
xvals = Table[xkoor[i], {i, iend}];
yvals = Table[ykoor[j], {j, jend}];
ungedreht = Outer[List, xvals, yvals] // Flatten[#, 1] & ;
myTickList[min_, max_, seg_, shift_?NumericQ, phi_?NumericQ,
len_: 0.01] :=
Table[{i,
Rotate[Pane[Style[AccountingForm[i], LineSpacing -> {0, 12}],
FrameMargins -> {{shift, 0}, {0, 0}}], phi], {len, 0}}, {i,
If[Head[seg] === List, Union[{min, max}, seg],
Range[min, max, seg]]}]
r = RotationTransform[grad, {x1, y1}]; gedreht =
r[ungedreht];
sortiert = SortBy[gedreht, Last];
labelingfunc[v : {x_, y_, w_}, i_, ___] :=
Placed[Grid[{{"Pflock ", i}, {"Koordinaten",
AccountingForm[{x, y}]}}, Frame -> All, Alignment -> Left],
Tooltip];
g = BubbleChart[(Append[#, 1] & /@ sortiert), ChartElements -> \!\(\*
Graphics3DBox[SphereBox[{0, 0, 0}],
Boxed->False,
ImageSize->30,
Lighting->"Neutral",
ViewPoint->{0,
DirectedInfinity[-1], 0}]\),
ColorFunction -> Function[{x, y, r}, Lighter[Yellow, x]],
ChartLabels ->
Placed[Style[#, "Subsection"] & /@ Range[Length@sortiert], Center],
BubbleSizes -> {0.07, 0.07}, LabelingFunction -> labelingfunc,
AspectRatio -> 1, Frame -> True, GridLines -> Automatic,
FrameStyle -> {Thick, Thick, Thick, Thick},
GridLinesStyle -> Directive[Blue, Dashed, Thick],
FrameLabel -> {" Easting [m\!\(\*
StyleBox[\"]\", \"Subsubsection\"]\) ", " Northing [m] ", " ", " ",},
PlotLabel -> "Grid-coordinates",
BaseStyle -> {FontWeight -> "Bold", FontSize -> 24},
FrameTicks -> {{myTickList[Min[gedreht[[All, 2]]] - 40.0,
Max[gedreht[[All, 2]]] + 40., 20, 5, 0],
None}, {myTickList[Min[gedreht[[All, 1]]] - 40.0,
Max[gedreht[[All, 1]]] + 40., 20, 5, Pi/6], None}},
BaseStyle -> {FontWeight -> "Bold", FontSize -> 18},
ImageSize -> {800, 800}
]



GridLines->Automaticputs gridlines at major tick positions. – kguler Aug 18 '12 at 8:24Symbol::argx: Symbol called with 0 arguments; 1 argument is expected. >>when I run your code above. Which Mathematica version did you use? – Nasser Aug 18 '12 at 19:20