Skip to content

How combine line plot and mesh plot? #18

Answered by bwoodsend
Sauradeep92 asked this question in Q&A
Discussion options

You must be logged in to vote

Are you sure that your axons aren't just much much smaller than your mesh or possibly inside your mesh? That would make them look like they've disappeared when they haven't.

Everything you plot goes into the same figure - it's not reset until you call vpl.show() or vpl.figure() - so it should be doing exactly what you want it to do. For example if I add definitions to your axons and path variables so that I can run your example...

import vtkplotlib as vpl
from stl.mesh import Mesh
import numpy as np

axons = np.random.uniform(-100, 100, (3, 5, 3))
for i in axons:
 vpl.plot(i, color ="dark red")

# Read the STL using numpy-stl
path = vpl.data.get_rabbit_stl()
mesh = Mesh.from_file(path)

#…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@bwoodsend
Comment options

@Sauradeep92
Comment options

@bwoodsend
Comment options

@Sauradeep92
Comment options

@bwoodsend
Comment options

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