finer grained zooming

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

finer grained zooming

Jim Radke

Hi,

 

I use the commands below to set the zoom control and x-axis.  I have a time series at every 100ms and precision of the values I’m plotting to 8 decimals, yet when I zoom I can’t  seem to see changes in the plot for anything sub-second.  Is there some configuration I need to add or change to support finer grained zooming ?

 

self.plotcontainer.overlays.append(ZoomTool(self.plotcontainer, drag_button="left", always_on=True, tool_mode="range", axis="index"))

self.plotcontainer.x_axis = ScalesPlotAxis(self.plotcontainer, orientation='bottom', title='Time', tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem()))

 

Thank you,

Jim Radke

[hidden email]



This e-mail and its attachments are intended only for the individual or entity to whom it is addressed and may contain information that is confidential, privileged, inside information, or subject to other restrictions on use or disclosure. Any unauthorized use, dissemination or copying of this transmission or the information in it is prohibited and may be unlawful. If you have received this transmission in error, please notify the sender immediately by return e-mail, and permanently delete or destroy this e-mail, any attachments, and all copies (digital or paper). Unless expressly stated in this e-mail, nothing in this message should be construed as a digital or electronic signature.

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: finer grained zooming

Peter Wang
On Mon, Nov 1, 2010 at 10:17 AM, Jim Radke <[hidden email]> wrote:
> I use the commands below to set the zoom control and x-axis.  I have a time
> series at every 100ms and precision of the values I’m plotting to 8
> decimals, yet when I zoom I can’t  seem to see changes in the plot for
> anything sub-second.  Is there some configuration I need to add or change to
> support finer grained zooming ?

Are you able to zoom to sub-second intervals?  If so, is your issue
that it only shows a straight line connecting the values from each
second to each subsequent second, and does not display intra-second
values?

> self.plotcontainer.overlays.append(ZoomTool(self.plotcontainer,
> drag_button="left", always_on=True, tool_mode="range", axis="index"))
> self.plotcontainer.x_axis = ScalesPlotAxis(self.plotcontainer,
> orientation='bottom', title='Time',
> tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem()))

There is nothing intrinsic in this code snippet that would cause a
limit to one-second intervals.  One thing you might want to look at is
setting the max_zoom_factor trait on the ZoomTool.  It defaults to
1e5; you might want to crank this up to 1e7 or so.

HTH,
Peter
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: finer grained zooming

bryce hendrix-2
In reply to this post by Jim Radke
On Mon, Nov 1, 2010 at 10:17 AM, Jim Radke <[hidden email]> wrote:

Hi,

 

I use the commands below to set the zoom control and x-axis.  I have a time series at every 100ms and precision of the values I’m plotting to 8 decimals, yet when I zoom I can’t  seem to see changes in the plot for anything sub-second.  Is there some configuration I need to add or change to support finer grained zooming ?

 

self.plotcontainer.overlays.append(ZoomTool(self.plotcontainer, drag_button="left", always_on=True, tool_mode="range", axis="index"))

self.plotcontainer.x_axis = ScalesPlotAxis(self.plotcontainer, orientation='bottom', title='Time', tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem()))


Jim, if you are using the latest ZoomTool changes (the swap to BetterSelectingZoom from Friday), set x_min_zoom_factor = -inf. That should remove all zoom limits in the x direction.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: finer grained zooming

bryce hendrix-2
On Mon, Nov 1, 2010 at 10:28 AM, bryce hendrix <[hidden email]> wrote:
On Mon, Nov 1, 2010 at 10:17 AM, Jim Radke <[hidden email]> wrote:

Hi,

 

I use the commands below to set the zoom control and x-axis.  I have a time series at every 100ms and precision of the values I’m plotting to 8 decimals, yet when I zoom I can’t  seem to see changes in the plot for anything sub-second.  Is there some configuration I need to add or change to support finer grained zooming ?

 

self.plotcontainer.overlays.append(ZoomTool(self.plotcontainer, drag_button="left", always_on=True, tool_mode="range", axis="index"))

self.plotcontainer.x_axis = ScalesPlotAxis(self.plotcontainer, orientation='bottom', title='Time', tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem()))


Jim, if you are using the latest ZoomTool changes (the swap to BetterSelectingZoom from Friday), set x_min_zoom_factor = -inf. That should remove all zoom limits in the x direction.


Peter was right, set x_max_zoom_factor=inf to remove limits on zooming in, x_min_zoom_factor is for limiting zooming out. Off to get a cup of coffee I obviously need...
 
Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: finer grained zooming

Jim Radke
In reply to this post by Peter Wang
Yes, I should have been more specific.  I can zoom sub-second but only see a straight line.  I will try setting max_zoom_factor.

Thanks to both of you Peter and Bryce !

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Peter Wang
Sent: Monday, November 01, 2010 10:27 AM
To: [hidden email]
Subject: Re: [Enthought-Dev] finer grained zooming

On Mon, Nov 1, 2010 at 10:17 AM, Jim Radke <[hidden email]> wrote:
> I use the commands below to set the zoom control and x-axis.  I have a time
> series at every 100ms and precision of the values I’m plotting to 8
> decimals, yet when I zoom I can’t  seem to see changes in the plot for
> anything sub-second.  Is there some configuration I need to add or change to
> support finer grained zooming ?

Are you able to zoom to sub-second intervals?  If so, is your issue
that it only shows a straight line connecting the values from each
second to each subsequent second, and does not display intra-second
values?

> self.plotcontainer.overlays.append(ZoomTool(self.plotcontainer,
> drag_button="left", always_on=True, tool_mode="range", axis="index"))
> self.plotcontainer.x_axis = ScalesPlotAxis(self.plotcontainer,
> orientation='bottom', title='Time',
> tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem()))

There is nothing intrinsic in this code snippet that would cause a
limit to one-second intervals.  One thing you might want to look at is
setting the max_zoom_factor trait on the ZoomTool.  It defaults to
1e5; you might want to crank this up to 1e7 or so.

HTH,
Peter
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

This e-mail and its attachments are intended only for the individual or entity to whom it is addressed and may contain information that is confidential, privileged, inside information, or subject to other restrictions on use or disclosure. Any unauthorized use, dissemination or copying of this transmission or the information in it is prohibited and may be unlawful. If you have received this transmission in error, please notify the sender immediately by return e-mail, and permanently delete or destroy this e-mail, any attachments, and all copies (digital or paper). Unless expressly stated in this e-mail, nothing in this message should be construed as a digital or electronic signature.
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: finer grained zooming

Peter Wang
On Mon, Nov 1, 2010 at 10:34 AM, Jim Radke <[hidden email]> wrote:
> Yes, I should have been more specific.  I can zoom sub-second but only see a straight line.  I will try setting max_zoom_factor.

Ah, in that case max_zoom_factor will not help you.  It sounds to me
like somehow the data is getting binned or decimated down to a
per-second level, before it gets to Chaco's LineRenderer.  Is there
any way you can share with us the code that you are using to move the
subsecond data into the plot, or is that too tightly integrated into
your production infrastructure?

-Peter
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: finer grained zooming

Jim Radke
You're right, I am binning it.

I'd like to pass in a timestamp timeseries in milliseconds or microseconds and use the ScalesPlotAxis tool to scale it by by hour.  Then as it zooms scale to minutes, to seconds, to millis as I zoom further.  If I set the timestamp data to anything finer the seconds I get strange foramatting on the x-axis.  Is there an alternative way to handle this ?

self.plotcontainer.x_axis = ScalesPlotAxis(self.plotcontainer, orientation='bottom', title='Time', tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem()))

Thanks again for all the help !
Jim




-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Peter Wang
Sent: Monday, November 01, 2010 10:38 AM
To: [hidden email]
Subject: Re: [Enthought-Dev] finer grained zooming

On Mon, Nov 1, 2010 at 10:34 AM, Jim Radke <[hidden email]> wrote:
> Yes, I should have been more specific.  I can zoom sub-second but only see a straight line.  I will try setting max_zoom_factor.

Ah, in that case max_zoom_factor will not help you.  It sounds to me
like somehow the data is getting binned or decimated down to a
per-second level, before it gets to Chaco's LineRenderer.  Is there
any way you can share with us the code that you are using to move the
subsecond data into the plot, or is that too tightly integrated into
your production infrastructure?

-Peter
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

This e-mail and its attachments are intended only for the individual or entity to whom it is addressed and may contain information that is confidential, privileged, inside information, or subject to other restrictions on use or disclosure. Any unauthorized use, dissemination or copying of this transmission or the information in it is prohibited and may be unlawful. If you have received this transmission in error, please notify the sender immediately by return e-mail, and permanently delete or destroy this e-mail, any attachments, and all copies (digital or paper). Unless expressly stated in this e-mail, nothing in this message should be construed as a digital or electronic signature.
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev