Quantcast
Browsing all 50 articles
Browse latest View live

Drawing and erasing lines

I nees to draw several lines, one after one. I need, before drawn one, erasing the old one. For exmple weahave two pointe and a line between. With mouse one of these ponists is chandeg and I need a...

View Article


FigureCanvasTkAgg for tensorflow

Is it possible to use the pixels on a FigureCanvasTkAgg canvas as input for a tensorflow neural network? 1 post - 1 participant Read full topic

View Article


Erase/delete lines from a plot

I have a software that draws, sequentially, Bezier curves, in a graph, as the coordinates of the vertices are modified I need that before drawing a new line, the last line drawn is erased, before...

View Article

Image may be NSFW.
Clik here to view.

Histogram width problem

when having a bin with zero count, the width of whole histogram changes and looks bad, like here in p1, p18 and p24: I tried rwidth but doesn’t solve it. any ideas? 2 posts - 2 participants Read full...

View Article

Image may be NSFW.
Clik here to view.

Home page infrastructure tour

Hi folks! I want to commend whoever worked on the matplotlib.org landing page, for it is absolutely gorgeous! I want to steal basically all of it for the napari.org home page, but I’m finding it hard...

View Article


Image may be NSFW.
Clik here to view.

Export png file with line width of 1 pixel

Hi, I want to export .png file that contains a line with a width of one pixel. The best I could come up with so far is: import matplotlib.pyplot as plt import numpy as np fig = plt.figure(figsize=(3,...

View Article

Image may be NSFW.
Clik here to view.

Can't make a line non-transparent

Hi, I’m using the LineCollection object to make the line multicolored. But as you can see, for some reason it’s not fully opaque (both parts of the line are visible at a point of intersection). I set...

View Article

Image may be NSFW.
Clik here to view.

Dicom Image Slices Viewer

Hello, I’m trying to use your code for Image Slices Viewer in Python to adapt the code for Dicom images. The result that I obtain running the code is wrong, I should watch a medical image and have the...

View Article


Pasting a filename into save gun

(another topic is why I must do this sometimes in my loops, but not always, but) When some of my plots get particularly complicated, savefig balks, so I do a try: except: plt.show() In the gui, I can...

View Article


Underflow encountered in multiply while running streamplot()

Hello! I am trying to plot the streamlines around an airfoil using streamplot function as so plt.streamplot(XX, YY, Vx, Vy). However I am getting the error: Traceback (most recent call last): File...

View Article

Image may be NSFW.
Clik here to view.

How to avoid line crossing the markers

Hi everybody! I would like to replicate the plot below: I tried with something like: plt.plot(x, y, color=‘red’,fillstyle=‘none’, marker=“*”,markersize=10), but the problem is that the line crosses...

View Article

Image may be NSFW.
Clik here to view.

Voronoi Drawings on PNG

I am working on a project where I display a full world map of the Foxhole game. The developers provide through their API the requirements to build a Voronoi diagram. Through their API they provide...

View Article

Coastlines and States won't plot

Attempting to plot some meteorological data. Plot the data and then add states and coastlines. I’ve tried adjusting zorder but states and coastlines won’t show up. Here’s the matplotlib portion of the...

View Article


Create 2d heatmap from set of 3d points

So let’s say we have a set of 3d points, where the three dimensions represent (x,y,value) Does matplotlib have a way to interpolate these points to make a realistic heatmap. So e.g. if for all i=0 to...

View Article

Using PySide2 on Raspberry with matplotlib fails

If I try to from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg I get a failure of import not found. No module named 'matplotlib.backends.backend_qtagg I am using Python3 OS Buster. Any...

View Article


Embed texts and autotexts

I’m trying to move some matplotlib graphs to streamlit but having a problem with the autotext and text lists that I’ve used to adjust labels. I have created a function within which the plot is created...

View Article

Image may be NSFW.
Clik here to view.

Cmap.set_over and set_under not working in newer python environments

This code is adapted from the contourf demo: import matplotlib.pyplot as plt import numpy as np delta = 0.025 x = y = np.arange(-3.0, 3.01, delta) X, Y = np.meshgrid(x, y) Z1 = np.exp(-X**2 - Y**2) Z2...

View Article


License for inclusion of MPL example code & documentation

I came across a project that happens to include the example code for an annotated heatmap (near) verbatim from the Matplotlib gallery: Creating annotated heatmaps — Matplotlib 3.7.2 documentation The...

View Article

Scientific way of generating color cycles

Since the introduction of ‘viridis’ as a default colormap and a marvelous talk about its development, discussions with any collaborators have been greatly streamlined: use this colormap instead of...

View Article

Image may be NSFW.
Clik here to view.

3D Polar Plot for well deviation plots

Hello, is there a way to get a 3D polar plot as shown on the left side of the picture with a “round” coordinate system? I found the examples for 3D polar plots but would like to have this “round”...

View Article
Browsing all 50 articles
Browse latest View live