# Change format of ticks to prevent collision

I am plotting large figures and the ticks on the X axes (horizontal) are colliding since there are many trailing zeros from numbers like "1000000" and then directly after the number "2000000".

As an example, I using this code:

lhs[x_, y_] := x^2+y^2
rhs[y_] := 1000^2

s1=1000;
ticks1 = Table[{Sign[i] Sqrt[Abs[i]], i}, {i, -s1, s1, 150}];

s2 = 1000;
ticks2 = Table[{Sign[i] Sqrt[Abs[i]], i}, {i, -s2, s2, 150}];

a=35;
ContourPlot[lhs[Sign[x] x^2, Sign[y] y^2] == rhs[Sign[y] y^2],
{x, -a, a}, {y, -a, a}, FrameTicks -> {{ticks1,None},{ticks2,None}}]


Which generates this image:

As you can see, the bottom ticks are all merged together.

Is there a way to make it look a bit nicer, either by rotating by 90 degrees the ticks on the bottom axes so they go "down" instead of "across" or better yet representing the ticks in scientific notation?

ContourPlot[
lhs[Sign[x] x^2, Sign[y] y^2] == rhs[Sign[y] y^2], {x, -a, a}, {y, -a, a},
FrameTicks :> {{ticks1, None}, {ticks2 /. {a_, b_} :> {a, Rotate[b, Pi/2]}, None}}]


Further options and demo for ScientificForm (don't forget the N!)

ContourPlot[
lhs[Sign[x] x^2, Sign[y] y^2] == rhs[Sign[y] y^2], {x, -a, a}, {y, -a, a},
FrameTicks :> {{ticks1, None}, {ticks2[[;; ;; 2]] /. {a_, b_} :>
{a, Rotate[ScientificForm[N @ b], Pi/4]}, None}}]


• Thanks for you reply, is there a way to write in scientific notation once rotated? Bacuse when the numbers get large it will look silly having 100000000000000000 for example. Commented Aug 2, 2017 at 18:21