3
$\begingroup$

Consider:

f[x_] := (1 + x)^(1/x);
Manipulate[
 Plot[f[x], {x, -eps, eps}],
 {{eps, 0.00001}, {1, .1, .01, .001, .0001, .00001, .000001},
  ControlType -> SetterBar}]

Which gives this image.

enter image description here

How can I double the number of digits used in the labels for the tick marks on the vertical axis? And how can I replace the scientific notation in the last setter bar choice to pure decimal (i.e..000001)?

$\endgroup$
0

1 Answer 1

3
$\begingroup$

As to your first question

f[x_] := (1 + x)^(1/x)

 eps = 0.00001;

{v, b} = {f@-eps, f@eps};

r = Range[b, v, (v - b)/5.];

Plot[f[x], {x, -eps, eps},
 Ticks -> {Automatic, Transpose[{r, NumberForm[#, {12, 10}] & /@ r}]}]

enter image description here

2nd question

SetterBar[1, MapThread[Rule, {#, AccountingForm /@ #} &
  [{1, .1, .01, .001, .0001, .00001, .000001}]]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.