Creating graph with date and time in axis labels with matplotlib
I have my data in an array of the following structure,
I have my data in an array of the following structure,
I’m trying to embed a plot in my Tkinter GUI coded in Python. I believe the code below succeeds in simply putting a graph into a canvas, but I don’t have any control of the canvas location within the GUI grid. I want to be able to have a subsection of my GUI be the plot…not the entirety of it. How can I position this canvas widget?
I have written code that opens 16 figures at once. Currently, they all open as separate graphs. I’d like them to open all on the same page. Not the same graph. I want 16 separate graphs on a single page/window. Furthermore, for some reason, the format of the numbins and defaultreallimits doesn’t hold past figure 1. Do I need to use the subplot command? I don’t understand why I would have to but can’t figure out what else I would do?
I’m working on some computer vision algorithm and I’d like to show how a numpy array changes in each step.
I’m plotting data in Python using matplotlib. I am updating the data of the plot based upon some calculations and want the ylim and xlim to be rescaled automatically. Instead what happens is the scale is set based upon the limits of the initial plot. A MWE is
I am trying to use seaborn, because of its distplot function. But I prefer the default matplotlib settings. When I import seaborn, it changes automatically the appearance of my figure.
Is it possible to change the line color in a plot when values exceeds a certain y value?
Example:
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
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.
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.