Skip to content

Multiple Images in one Notebook Cell #4222

@hohlraum

Description

@hohlraum

Using Image() to display inline pictures in a notebook seems to only work reliably if Image() is the last command in the cell. For instance:

print 'before'
Image(filename = 'picture.png')

This prints the string, and displays the picture as it should.

print 'before'
Image(filename = 'picture.png')
print 'after'

This prints the two strings, but does not display the picture.

print 'Label for one'
Image(filename = 'one.png')
print 'Label for two'
Image(filename = 'two.png')

This prints the two strings, and then only displays the second image.

for img in ['one.png', 'two.png']:
    Image(filename = img)

This doesn't display anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions