zooming

Cartesian zoom with polar plot in python

Cartesian zoom with polar plot in python Question: I am trying to plot some data in polar coordinates (I am currently using the polar projection): The code I am using is the following: import matplotlib.pyplot as plt import numpy as np # Create radial and angular array r = np.linspace(1.0,10,11) t = np.linspace(0.0,0.5*np.pi,101) # Define …

Total answers: 2

Is there a way to start a plot already zoomed on a specific area using plotly?

Is there a way to start a plot already zoomed on a specific area using plotly? Question: I have a scatter plot made with plotly (specifically offline plotly with the Python API on a Jupyter Notebook) and as you know, plotly makes it easy for the user to zoom and frame specific areas, but I’d …

Total answers: 4

How to Zoom and Pan Image in Python?

How to Zoom and Pan Image in Python? Question: I have an image: I wish to pick a point on this image. However, when I display the image, I can only see a part of it on the screen, as follows: I wish to know how to zoom out and pan the image in a …

Total answers: 1

Expanding/Zooming in a numpy array

Expanding/Zooming in a numpy array Question: I have the following array: import numpy as np a = np.array([[2, 3, 5], [4, 6, 7], [1, 5, 7]]) I want to expand it to this array: b = [[2 2 2 3 3 3 5 5 5] [2 2 2 3 3 3 5 5 5] [2 …

Total answers: 3

How to enable Pan and Zoom in a QGraphicsView

How to enable Pan and Zoom in a QGraphicsView Question: I am using python and Qt Designer to implement loading tiff images and to enable Pan and Zoom on some mouse event (wheel – zoom, press wheel – pan). I was looking into some options and classes that can work with images etc, and so …

Total answers: 3

How can I accomplish `set_xlim` or `set_ylim` in Bokeh?

How can I accomplish `set_xlim` or `set_ylim` in Bokeh? Question: I create a figure in a function, e.g. import numpy from bokeh.plotting import figure, show, output_notebook output_notebook() def make_fig(): rows = cols = 16 img = numpy.ones((rows, cols), dtype=numpy.uint32) view = img.view(dtype=numpy.uint8).reshape((rows, cols, 4)) view[:, :, 0] = numpy.arange(256) view[:, :, 1] = 265 – …

Total answers: 4

pyplot zooming in

pyplot zooming in Question: I am trying to plot some data from FITS files and I wanted to know if anyone knows how to focus on certain regions of a plot’s axis? Here is some example code: import pyfits from matplotlib import pyplot as plt from matplotlib import pylab from pylab import * #Assuming I …

Total answers: 2