MathGroup Archive 2011

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

Search the Archive

Nasti jitter in plotsize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117991] Nasti jitter in plotsize
  • From: roby <roby.nowak at gmail.com>
  • Date: Thu, 7 Apr 2011 08:06:51 -0400 (EDT)

Dear all,

Manipulate[Plot[Sin[1/k x], {x, -k \[Pi], k \[Pi]}], {k, 1, 10}]

I want to scale my x-axis simultaneously with my function (no I dont
want to zoom the function)
What happens is a small jitter of the plot size.
This jitter exactly happens when the most left (most right) tick mark
value coincidences with the plot border.
I tried to remove the first and last tick of the final plot to avoid
the problem.

I was able to extract the ticks and remove the very first and last
ones of the plot like this:
With[{k=3},
(Plot[Sin[1/k], {x, - k \[Pi], k \[Pi]}] // First@AbsoluteOptions[#,
Ticks] &) /.
 (Ticks -> {x_, y_}) :> (Ticks -> {Rest@Most[x], Rest@Most@y})
]

but I failed by automaticaly (not by hand) replacing the original
ticks with with the modifyed ticks in the plot.


Any suggestion ?

btw constraining the PlotSize and similar dose not help.

Cheers Robert


  • Prev by Date: Re: ProgressIndicator and ParallelTable problem :(
  • Next by Date: Re: multiple contexts in package
  • Previous by thread: Re: Interpolation on regions
  • Next by thread: Re: Nasti jitter in plotsize