set matplotlib 3d plot aspect ratio

import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D Setting the aspect ratio works for 2d plots: ax = plt.axes() ax.plot([0,1],[0,10]) ax.set_aspect('equal','box') But does not for 3d: ax = plt.axes(projection='3d') ax.plot([0,1],[0,1],[0,10]) ax.set_aspect('equal','box') Is there a different syntax for the 3d case, or it’s not implemented? Answers: Thank you for visiting the Q&A section on Magenaut. Please … Read more

How do I create an automatically updating GUI using Tkinter?

from Tkinter import * import time #Tkinter stuff class App(object): def __init__(self): self.root = Tk() self.labeltitle = Label(root, text="", fg="black", font="Helvetica 40 underline bold") self.labeltitle.pack() self.labelstep = Label(root, text="", fg="black", font="Helvetica 30 bold") self.labelstep.pack() self.labeldesc = Label(root, text="", fg="black", font="Helvetica 30 bold") self.labeldesc.pack() self.labeltime = Label(root, text="", fg="black", font="Helvetica 70") self.labeltime.pack() self.labelweight = Label(root, text="", … Read more

Store and reload matplotlib.pyplot object

I work in an psudo-operational environment where we make new imagery on receipt of data. Sometimes when new data comes in, we need to re-open an image and update that image in order to create composites, add overlays, etc. In addition to adding to the image, this requires modification of titles, legends, etc.

What is the currently correct way to dynamically update plots in Jupyter/iPython?

In the answers to how to dynamically update a plot in a loop in ipython notebook (within one cell), an example is given of how to dynamically update a plot inside a Jupyter notebook within a Python loop. However, this works by destroying and re-creating the plot on every iteration, and a comment in one of the threads notes that this situation can be improved by using the new-ish %matplotlib nbagg magic, which provides an interactive figure embedded in the notebook, rather than a static image.