Open
Conversation
9928f64 to
ea25303
Compare
9ba3a64 to
1595d8f
Compare
1595d8f to
06e1d02
Compare
Contributor
|
Adapted example from import pyqtgraph as pg
from pyqtgraph.graphicsItems.NonUniformImage import NonUniformImage
import numpy as np
pg.mkQApp()
pw = pg.PlotWidget()
pw.show()
# Linear x array for cell centers:
x = np.linspace(-4, 4, 9)
# Highly nonlinear x array:
x2 = x**3
y = np.linspace(-4, 4, 9)
z = np.sqrt(x[np.newaxis, :]**2 + y[:, np.newaxis]**2)
nuimg = NonUniformImage(x2, y, z)
nuimg.setColorMap(pg.colormap.get("Purples", source="matplotlib"))
pw.addItem(nuimg)
X, Y = np.meshgrid(x2, y, indexing='ij')
pdi = pg.PlotDataItem(X.ravel(), Y.ravel(), pen=None, symbol='x')
pw.addItem(pdi)
pg.exec()The correct interpretation is that the provided coords are supposed to be the sampled data points, while the drawn polygons are shaded to the nearest coord's Z value. |
8559cfd to
446d61b
Compare
446d61b to
72c0dd8
Compare
Member
Author
|
still need to sort out |
e2bda60 to
00a5914
Compare
00a5914 to
dfeeb25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently realized that NonUniformImage didn't have an entry in our documentation. This PR aims to correct that, and also makes some minor changes to NonUniformImage as well.