Skip to content

Instantly share code, notes, and snippets.

@dukelec
dukelec / mpl_interaction.py
Last active February 7, 2023 10:29 — forked from t20100/mpl_interaction.py
Pan and zoom interaction over a matplotlib Figure
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# /*##########################################################################
#
# Copyright (c) 2016 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell