VOCAL 1.17.8
  • Index

      User Documentation

      • Program Overview
      • Installation
      • Getting the Data
      • Supported Data Types
      • Getting Started

      Developer Documentation

      • Getting Started Developing
      • Coding Conventions
      • Development Enviroment
      • Building and Writing Docs
      • Updating The Site
      • Code Documentation

      Support

      • Troubleshoot
      • Submit Bugs or Issues
      • Contact
  • Page
      • NavigationToolbar2Calipso
  • « Linear Algebra
  • Option Menu »
  • Source

NavigationToolbar2Calipso¶

Custom toolbar implementation deriving from the matplotlib.backend NavigationToolbar2, The TkAgg port is not used because we specifically implement our own GUI and therefore to not want to draw the TkAgg’s navigation bar. So we declare this class and leave it mostly bare, thus nothing will be rendered to the screen but we still have access to the button functions and can bind them to our own GUI

Inheritance diagram of tools.navigationtoolbar
class NavigationToolbar2CALIPSO(master, canvas, frame)[source]¶

Custom toolbar derived from matplotlib.backend, since we won’t be specifically displaying any of their provided TkGUI, we will be creating our own GUI outside of the toolbar and simply using the functions provided by NavigationToolbar2. Thus we strip the toolbar of anything GUI related

Parameters:
  • canvas – The main canvas of the application that will be drawn to
  • master – The master program (Calipso)
draw_rubberband(event, x0, y0, x1, y1)[source]¶

Draws a rectangle rubber band to indicate area that will be zoomed in on

Parameters:
  • event – Tkinter passed event object
  • x0 – top left x coordinate
  • y0 – top left y coordinate
  • x1 – bottom right x coordinate
  • y1 – bottom right y coordinate
mouse_move(event)[source]¶

The event bound to mouse motion once the plot is rendered, this function will simply display the coordinates the mouse is currently over. Custom implemented so that the coordinate system can also display ‘lat’. This is done by grabbing the axes and finding both ‘time’ and ‘latitude’ axes, then using transData to translate their coordinates to screen coordinates then back to the other axis coordinates

Parameters:event – A matplotlib event
release(event)[source]¶

Upon mouse release while zooming, the rectangle is deleted and the application is zoomed to that view

Parameters:event – Tkinter passed event object
release_zoom(event)[source]¶

the release mouse button callback in zoom to rect mode, upon release the plot will zoom to the location of the rectangle

Parameters:event – Tkinter passed event object
set_message(s)[source]¶

Set the message of the stringvar

Parameters:s (str) – String to set
update()[source]¶

Call the base class update function

zoom(*args)[source]¶

Caller function for activating and deactivating zoom mode

Back to top

© Copyright 2015, Grant Mercer, Nathan Qian.
Created using Sphinx 1.5.6.