Re: Nasti jitter in plotsize
- To: mathgroup at smc.vnet.net
- Subject: [mg118001] Re: Nasti jitter in plotsize
- From: Tomas Garza <tgarza10 at msn.com>
- Date: Fri, 8 Apr 2011 04:13:40 -0400 (EDT)
Scaling the x-axis simultaneously with your function might be achieved by adjusting the PlotRange accordingly. For example, Manipulate[Plot[Sin[1/k x],{x,-k \[Pi],k \[Pi]},PlotRange->{{-3k,3k},{-1,1}}],{k,1,10}] -Tomas > Date: Thu, 7 Apr 2011 08:06:51 -0400 > From: roby.nowak at gmail.com > Subject: [mg117991] Nasti jitter in plotsize > To: mathgroup at smc.vnet.net > > 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 >