When i try to use the pan and zoom tool, the plot rotates on left click and zooms from the center on right click. zooming the plot by making a rectangular selection is not working.
Has somebody a clue how this problem can be solved?
Looking through the source code on github, it doesn't appear that the features you are looking for are supported. Hence you are unable to zoom and/or pan using mplot3d.Axes3D
def can_zoom(self) :
"""
Return *True* if this axes supports the zoom box button functionality.
3D axes objects do not use the zoom box button.
"""
return False
def can_pan(self) :
"""
Return *True* if this axes supports the pan/zoom button functionality.
3D axes objects do not use the pan/zoom button.
"""
return False
Source code: https://github.com/matplotlib/matplotlib/blob/master/lib/mpl_toolkits/mplot3d/axes3d.py
At the time of writing these are on lines 1017 through to 1031
Related
Matlab has a useful zoom mode triggered by zoom xon or zoom yon whereby you can click-and-drag with the mouse to zoom in on data, but with only one dimension (x or y, respectively) changing. Instead of an elastic box, the cursor changed into an elastic I-beam that allowed you to set the beginning and end of the range quite precisely.
Is there any way of getting a matplotlib figure to do the same thing? Playing with the toolbar, and briefly looking into the code behind it, I only see a "zoom rect" mode.
I'm aware that you can approximate this effect by right-clicking-and-dragging in "pan" mode, while trying to ensure that your hand only moves in one dimension, but that can be quite frustratingly imprecise. If there were a zoom xon equivalent, I would gladly use that instead.
The interactive navigation lists among its shortcuts
Constrain pan/zoom to x axis: hold x when panning/zooming with mouse
Constrain pan/zoom to y axis: hold y when panning/zooming with mouse
How can you scroll through Numpy array images in PyQt5? This is the shape of my input images array:
X = [512, 512, 100]
I tried using the onscroll method which uses mouse scroll event and we can mpl_connect it on the canvas (Matplotlib). This seems to work fine but when I put this canvas on PyQt5 canvas, the scrolling stops. Is there any way I can implement this in PyQt5?
I have tried to keep this question simple because I want a generic answer, but if someone is interested, I am ready to share the (non-working) code.
I am trying to reproduce the following image with my own data. However, I’m not sure how to create the red camera icon and the corresponding blue axis lines protruding from it.
http://mesh.brown.edu/3DP-2016/hw2/calib-extrinsics.png
My loss function has two outliers (no idea why, is below 1, and suddenly after 3.000 steps shows a 6000). So nothing is visible, as all is a straight line with that one outlier rescaling the whole thing. How can I rescale this?
thx
You can zoom in TensorBoard by dragging on the chart.
You can also make the display larger by pressing the small blue box in the lower-left corner of the chart.
To be clear, whith TensorFlow you just have to select a zone in the graph that you want to zoom in.
For me you just need to do alt (or option) then zoom in our out with your mouse. If you try to just scroll/zoom with your mouse on the plot it will even tell you that explicitly.
It is possible to set the axis limits directly for graphs in the time series tab (works with my tensorboard version, 2.5.0).
Just hover with the mouse over the wanted axis and an edit icon will appear. press it and it will let you set the max and min values for that axis.
image of icon
How do you find the location of the plot area of an axes in figure coordinates or pixel coordinates?
I'm actually trying to capture click and motion events on the x axis area below the plot. So I'm getting an event and trying to test if it's y coordinate is below the plot area. I would think this is simple, but I can't seem to find anything by searching.
SOLVED - found it - wasn't easy to find - axes.bbox.bounds bounds is in pixels, same as the event.