MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Problem with Plot and Ticks-function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23339] RE: [mg23274] Problem with Plot and Ticks-function
  • From: "Higinio Ramos Calle" <higra at gugu.usal.es>
  • Date: Thu, 4 May 2000 02:59:08 -0400 (EDT)
  • References: <200004300205.WAA16759@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

----- Original Message -----
From: Hans Friedrich Steffani <hans.steffani at e-technik.tu-chemnitz.de>
To: mathgroup at smc.vnet.net
Subject: [mg23339] [mg23274] Problem with Plot and Ticks-function


> theticks[min_, max_] :=
>   Module[{}, Print["xmin=", min, " xmax=", max];
>     Transpose[{Range[min + \[Pi]/4, max, \[Pi]/4],
>         Range[min + \[Pi]/4, max, \[Pi]/4]*180/\[Pi]}]]
>
> Plot[Sin[x], {x, 0, \[Pi]}, Ticks -> {theticks, Automatic}]
>
> Produces the output
> xmin=-0.0785398, xmax=3.22013
> instead of
> xmin=0, xmax=3.14
>
> and stupid ticks at the x-Axis.
>
> How do I get correct ticks?
>
> Hans Friedrich Steffani
>
>
>
> --
> Hans Friedrich Steffani
> Institut fuer Elektrische Maschinen und Antriebe, TU Chemnitz
> mailto:hans.steffani at e-technik.tu-chemnitz.de
> http://www.tu-chemnitz.de/~hfst/
>
Dear Hans,
you have the answer. The function theticks needs two arguments, so the only
thing you have to do is to feed this function:
Plot[Sin[x], {x, 0, \[Pi]}, Ticks -> {theticks[0,Pi], Automatic}]

Higinio Ramos
Dpto. Matemática Aplicada
U. de Salamanca




  • Prev by Date: Question: Fitting numerical solutions of ord. diff. equ.
  • Next by Date: Re: avoid spurious vertical segment in step function plot
  • Previous by thread: Re: Question: Fitting numerical solutions of ord. diff. equ.
  • Next by thread: Symbols & Legend Fonts in MultipleListPlot...