Skip to content

Commit

Permalink
Doc: updated screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Oct 23, 2023
1 parent 60dc544 commit 5407b96
Show file tree
Hide file tree
Showing 32 changed files with 27 additions and 17 deletions.
Binary file modified doc/images/screenshots/__init__.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/computations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/contrast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/cross_section.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/cross_section2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/dotarraydemo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/fit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/get_point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/hist2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/image_plot_tools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/imagefilter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/imagesuperp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/imagexy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/manager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/mandelbrot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/pcolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/simple_dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/simple_window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/screenshots/transform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion plotpy/tests/features/test_computations.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def test_computations():
)
legend = make.legend("TR")
_win = ptv.show_items(
[curve, range, disp0, disp1, disp2, legend], plot_type="curve"
wintitle="Plot computations",
items=[curve, range, disp0, disp1, disp2, legend],
plot_type="curve",
)


Expand Down
4 changes: 3 additions & 1 deletion plotpy/tests/features/test_cursors.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def test_cursor():
xcursor = make.xcursor(-4, 2.5, label="x = %.2f<br>y = %.2f")
legend = make.legend("TR")
_win = ptv.show_items(
[curve, hcursor, vcursor, vcursor2, xcursor, legend], plot_type="curve"
wintitle="Plot cursors",
items=[curve, hcursor, vcursor, vcursor2, xcursor, legend],
plot_type="curve",
)


Expand Down
5 changes: 3 additions & 2 deletions plotpy/tests/features/test_imagesuperp.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def test_imagesuperp():
with qt_app_context(exec_loop=True):
win = create_window()
image1 = make.image(filename=filename, title="Original", colormap="gray")
data2 = np.array(image1.data.T[200:], copy=True)
image2 = make.image(data2, title="Modified")
data2 = np.array(image1.data[:, :150], copy=True)
data2[:100] = data2[-100:] = 0
image2 = make.image(data2, title="Modified", alpha_function="tanh")
plot = win.manager.get_plot()
plot.add_item(image1, z=0)
plot.add_item(image2, z=1)
Expand Down
1 change: 1 addition & 0 deletions plotpy/tests/features/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Window(QW.QMainWindow):
def __init__(self):
super().__init__()
win32_fix_title_bar_background(self)
self.setWindowTitle("PlotManager test")

filename = get_path("brain.png")
image1 = make.image(filename=filename, title="Original", colormap="gray")
Expand Down
6 changes: 5 additions & 1 deletion plotpy/tests/features/test_no_auto_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ def test_no_auto_tools():
x = linspace(-10, 10, 200)
y = sin(sin(sin(x)))
with qt_app_context(exec_loop=True):
_win = ptv.show_items([make.curve(x, y, color="b")], auto_tools=False)
_win = ptv.show_items(
[make.curve(x, y, color="b")],
auto_tools=False,
wintitle=test_no_auto_tools.__doc__,
)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion plotpy/tests/features/test_plot_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_plot_log():
y = np.exp(-x)
y[0] = 0
items = [make.curve(x, y, color="b"), make.error(x, y, None, y * 0.23)]
win = ptv.show_items(items, plot_type="curve")
win = ptv.show_items(items, plot_type="curve", wintitle=test_plot_log.__doc__)
plot = win.manager.get_plot()
plot.set_axis_scale("left", "log")
plot.set_axis_scale("bottom", "log")
Expand Down
4 changes: 2 additions & 2 deletions plotpy/tests/items/test_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def test_plot():
"""Test plot"""
"""Curve plotting test"""
x = np.linspace(-10, 10, 200)
dy = x / 100.0
y = np.sin(np.sin(np.sin(x)))
Expand All @@ -40,7 +40,7 @@ def test_plot():
movable=False,
),
]
_win = ptv.show_items(items, wintitle="Curve plotting test", title="Curves")
_win = ptv.show_items(items, wintitle=test_plot.__doc__, title="Curves")


if __name__ == "__main__":
Expand Down
3 changes: 2 additions & 1 deletion plotpy/tests/items/test_image_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


def test_contour():
"""Contour plotting test"""
with qt_app_context(exec_loop=True):
# compute the image
delta = 0.025
Expand All @@ -27,7 +28,7 @@ def test_contour():
# show the image
_win = ptv.show_items(
[make.image(Z)] + make.contours(Z, np.arange(-2, 2, 0.5)),
wintitle="Sample contour plotting",
wintitle=test_contour.__doc__,
curve_antialiasing=False,
lock_aspect_ratio=True,
)
Expand Down
3 changes: 1 addition & 2 deletions plotpy/tests/items/test_image_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

def test_image_rgb():
"""Testing RGB image item"""
title = test_image_rgb.__doc__
with qt_app_context(exec_loop=True):
item = make.rgbimage(
filename=get_image_file_path("image.png"), xdata=[-1, 1], ydata=[-1, 1]
)
_win = ptv.show_items([item], plot_type="image", wintitle=title)
_wn = ptv.show_items([item], plot_type="image", wintitle=test_image_rgb.__doc__)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion plotpy/tests/items/test_mandelbrot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def draw_image(self, painter, canvasRect, srcRect, dstRect, xMap, yMap):
NX = x2 - x1
NY = y2 - y1
if self.data.shape != (NX, NY):
self.data = np.zeros((NY, NX), np.uint8)
self.data = np.zeros((NY, NX), np.int16)
mandelbrot(i1, j1, i2, j2, self.data, self.IMAX)

srcRect = (0, 0, NX, NY)
Expand Down
8 changes: 4 additions & 4 deletions plotpy/tests/items/test_svgshapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
from plotpy.tests import vistools as ptv


def test_image():
"""Testing ImageItem object"""
def test_svg():
"""Test showing SVG shapes"""
with qt_app_context(exec_loop=True):
path1, path2 = get_path("svg_tool.svg"), get_path("svg_target.svg")
csvg = make.svg("circle", path2, 0, 0, 100, 100, "Circle")
rsvg = make.svg("rectangle", path1, 150, 0, 200, 100, "Rect")
ssvg = make.svg("square", path1, 0, 150, 100, 250, "Square")
items = [csvg, rsvg, ssvg]
_win = ptv.show_items(items, wintitle="SVG shapes", lock_aspect_ratio=True)
_win = ptv.show_items(items, wintitle=test_svg.__doc__, lock_aspect_ratio=True)


if __name__ == "__main__":
test_image()
test_svg()
2 changes: 1 addition & 1 deletion plotpy/tests/widgets/test_simple_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def show_data(self, data, lut_range=None):
self.plot_widget.manager.set_contrast_range(*lut_range)
self.plot_widget.manager.update_cross_sections()
else:
self.item = make.image(data)
self.item = make.image(data, interpolation="nearest")
plot.add_item(self.item, z=0)
plot.replot()

Expand Down

0 comments on commit 5407b96

Please sign in to comment.