Skip to content

Two Slicer3DPlotter renders side by side in the same plot? #925

Answered by marcomusy
daniel-a-diaz asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @daniel-a-diaz
you can add any object to Slicer3DPlotter because it is a normal Plotter object:

pip install -U git+https://github.com/marcomusy/vedo.git

Then try:

from vedo import dataurl, Volume, Text2D, Arrow, Sphere
from vedo.applications import Slicer3DPlotter
from vedo.pyplot import histogram

vol = Volume(dataurl + "embryo.slc")

plt = Slicer3DPlotter(
    vol,
    cmaps=("gist_ncar_r", "jet", "Spectral_r", "hot_r", "bone_r"),
    shape=(1,2),
    sharecam=False,
    bg="white",
    bg2="lightblue",
)

# Can now add any other object to the Plotter scene:
histo = histogram(vol, bins=12, logscale=True).as2d(pos="top-left", scale=0.5)
plt += histo
plt += Arrow([120,120,120], [200,200,

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@ZiguoAtGitHub
Comment options

@daniel-a-diaz
Comment options

@daniel-a-diaz
Comment options

Answer selected by daniel-a-diaz
Comment options

You must be logged in to vote
6 replies
@daniel-a-diaz
Comment options

@marcomusy
Comment options

@marcomusy
Comment options

@daniel-a-diaz
Comment options

@marcomusy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants