|
From: Thomas C. <tca...@gm...> - 2015-03-26 15:55:08
|
And if I look at this on nabble the code looks fine, it just was not
redndering in inbox. Sorry, the issues is on my end.
On Thu, Mar 26, 2015 at 11:54 AM Thomas Caswell <tca...@gm...> wrote:
> Yikes, that formatting is almost worse!
>
> On Thu, Mar 26, 2015 at 11:53 AM rogerjames99 <ro...@be...>
> wrote:
>
>> Hi Thomas, I posted via nabble. It looks like something stripped the
>> code. Here is the bit where the axes are set up def setup_axes(self, fig,
>> rect): """ With custom locator and formatter. Note that the extreme values
>> are swapped. """ transform = PolarAxes.PolarTransform() angle_ticks = [(0,
>> r"$Right$"), (.5*pi, r"$Forward$"), (pi, r"$Left$")] grid_locator1 =
>> FixedLocator([v for v, s in angle_ticks]) tick_formatter1 =
>> DictFormatter(dict(angle_ticks)) grid_locator2 = MaxNLocator(4)
>> self.grid_helper = floating_axes.GridHelperCurveLinear(transform,
>> extremes=(0, pi, self.sonar_limit, 0), grid_locator1=grid_locator1,
>> grid_locator2=grid_locator2, tick_formatter1=tick_formatter1,
>> tick_formatter2=None, ) self.axes = floating_axes.FloatingSubplot(fig,
>> rect, grid_helper=self.grid_helper) self.axes.axis["bottom"].
>> major_ticklabels.set_rotation(180) self.axes.axis["left"].set_axis_direction("bottom")
>> self.axes.grid(b=True, which='major', color='b', linestyle='-')
>> fig.add_subplot(self.axes) # create a parasite axes whose transData in RA,
>> cz self.auxiliary_axes = self.axes.get_aux_axes(transform)
>> self.auxiliary_axes.patch = self.axes.patch # for auxiliary_axis to have a
>> clip path as in ax self.axes.patch.zorder=0.9 # but this has a side effect
>> that the patch is # drawn twice, and possibly over some other # artists.
>> So, we decrease the zorder a bit to # prevent this. self.lines, =
>> self.auxiliary_axes.plot(self.theta, self.radius) and here is the bit
>> where the plot is updated def idleCallback(self): global root plotit =
>> False logging.debug('Acquire the data lock') self.dataLock.acquire() if
>> self.newSonarDataAvailable: plotit = True theta = self.theta[:] radius =
>> self.radius[:] selfNewSonarDataAvailable = False self.dataLock.release() #
>> theta.insert(0, 0.) # theta.append(0.) # radius.insert(0, 0.) #
>> radius.append(0.) if plotit: logging.debug('Plotting')
>> self.lines.set_data(theta, radius) self.axes.relim()
>> self.axes.autoscale_view() self.canvas.draw() if have also put the full
>> code file here <https://dl.dropboxusercontent.com/u/84613021/barnaby.py>
>> As you can see I have been trying a few other things. Looks like if am
>> missing the boat pretty comprehensively!
>> ------------------------------
>> View this message in context: Re: Help with updating the limits of an
>> axis to reflect the range of new data
>> <http://matplotlib.1069221.n5.nabble.com/Help-with-updating-the-limits-of-an-axis-to-reflect-the-range-of-new-data-tp45261p45269.html>
>> Sent from the matplotlib - users mailing list archive
>> <http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html> at
>> Nabble.com.
>> ------------------------------------------------------------
>> ------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
|