- #1

- 319

- 0

Anyone know how to do it...

I have googles it and find no useful things. Kind of frustrated.

- Mathematica
- Thread starter hanson
- Start date

- #1

- 319

- 0

Anyone know how to do it...

I have googles it and find no useful things. Kind of frustrated.

- #2

CompuChip

Science Advisor

Homework Helper

- 4,302

- 47

Code:

```
ScientificTicks[plot_Graphics, xSci_: False, ySci_: True] :=
Module[{t},
Show[plot,
Ticks -> {(t = Ticks /. AbsoluteOptions[plot, Ticks])[[1]] /.
If[xSci, {x_, xlab_?NumericQ, r__} -> {x, ScientificForm[x],
r}, {}],
t[[2]] /.
If[ySci, {y_, ylab_?NumericQ, r__} -> {y, ScientificForm[y],
r}, {}]}]
];
```

Code:

```
(* Normal on x, Scientific on y *)
ScientificTicks[Plot[Exp[x], {x, 0, 100}], False, True]
ScientificTicks[Plot[Exp[x], {x, 0, 100}], False]
ScientificTicks[Plot[Exp[x], {x, 0, 100}]]
(* Scientific on x, Normal on y *)
ScientificTicks[Plot[Exp[x], {x, 0, 100}], True, False]
(* Scientific on both *)
ScientificTicks[Plot[Exp[x], {x, 0, 100}], True, True]
ScientificTicks[Plot[Exp[x], {x, 0, 100}], True]
```

- Replies
- 3

- Views
- 558

- Last Post

- Replies
- 8

- Views
- 10K

- Last Post

- Replies
- 3

- Views
- 4K

- Replies
- 0

- Views
- 2K

- Last Post

- Replies
- 1

- Views
- 2K

- Last Post

- Replies
- 3

- Views
- 9K

- Replies
- 0

- Views
- 3K

- Last Post

- Replies
- 1

- Views
- 4K

- Replies
- 1

- Views
- 4K

- Replies
- 3

- Views
- 4K