axis & labels in volume rendereing
All, I wondered if there is a way to do this: I have been creating volume renderings of spectroscopic datacubes for a while now. What I miss yet is coordinate axis *with labels*. Like here https://doc.qt.io/qt-5.9/qtdatavisualization-volumetric-example.html Any ideas on how to achieve this? Many thanks, Max
Hi Max, I don't know if this is possible -- if it is, Mike Zingale might be the person who would know. Maybe leave an issue on github and ping him on it? On Sat, Aug 3, 2019 at 2:35 AM Maximilian Fabricius <mxhf@mpe.mpg.de> wrote:
All,
I wondered if there is a way to do this:
I have been creating volume renderings of spectroscopic datacubes for a while now. What I miss yet is coordinate axis *with labels*.
Like here https://doc.qt.io/qt-5.9/qtdatavisualization-volumetric-example.html
Any ideas on how to achieve this?
Many thanks,
Max _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
As far as I know, it is not possible. It is something I've wanted to do in the future, but it is a big enough hack that I haven't had time to do it. On Mon, Aug 5, 2019 at 11:56 AM Matthew Turk <matthewturk@gmail.com> wrote:
Hi Max,
I don't know if this is possible -- if it is, Mike Zingale might be the person who would know. Maybe leave an issue on github and ping him on it?
On Sat, Aug 3, 2019 at 2:35 AM Maximilian Fabricius <mxhf@mpe.mpg.de> wrote:
All,
I wondered if there is a way to do this:
I have been creating volume renderings of spectroscopic datacubes for a
while now. What I miss yet is coordinate axis *with labels*.
Like here https://doc.qt.io/qt-5.9/qtdatavisualization-volumetric-example.html
Any ideas on how to achieve this?
Many thanks,
Max _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
-- Michael Zingale Associate Professor Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800 *phone*: 631-632-8225 *e-mail*: Michael.Zingale@stonybrook.edu *web*: http://www.astro.sunysb.edu/mzingale github: http://github.com/zingale
Hello all, It is possible to create a point/line source out of LaTeX and then add that source to the volume and include it with the render. I include the source code which I wrote to do this below, but it's untested. I think your backend may have to be set properly for this to work. Take care, Andrew ---------------------------------------------------------------- def yt_text_to_points(self,veco,vecx,vecy,text,alpha=0.5,font=20, show=False): """ Take two 3D vectors x ('vecx' and 'vecy'), and a string of text ('text'), and return a numpy array of shape (6,npoints) which has entries (x,y,z,r,g,b). The values r, g, and b are between 0 and 1. """ fig, axes = plot.subplots() plot.rc('text',usetex=True) axes.text(0.5,0.5,text,fontsize=font,ha='center',va='center') plot.axis('off') fig.canvas.draw() if show: plot.show() X=np.array(fig.canvas.renderer._renderer) Y=[] Y2=[] for i in range(0,480): for j in range(0,640): if X[i,j,0]!=255 or X[i,j,1]!=255 or X[i,j,2]!=255: xold=(i-240)/240.0 yold=(j-320)/320.0 vecnew=[veco[0]-vecy[0]*xold+vecx[0]*yold, veco[1]-vecy[1]*xold+vecx[1]*yold, veco[2]-vecy[2]*xold+vecx[2]*yold] Y.append([vecnew[0],vecnew[1],vecnew[2]]) Y2.append([1.0-X[i,j,0]/255.0,1.0-X[i,j,1]/255.0, 1.0-X[i,j,2]/255.0,alpha]) return(np.array(Y),np.array(Y2)) On 8/5/19 11:56 AM, Matthew Turk wrote:
Hi Max,
I don't know if this is possible -- if it is, Mike Zingale might be the person who would know. Maybe leave an issue on github and ping him on it?
On Sat, Aug 3, 2019 at 2:35 AM Maximilian Fabricius <mxhf@mpe.mpg.de> wrote:
All,
I wondered if there is a way to do this:
I have been creating volume renderings of spectroscopic datacubes for a while now. What I miss yet is coordinate axis *with labels*.
Like here https://doc.qt.io/qt-5.9/qtdatavisualization-volumetric-example.html
Any ideas on how to achieve this?
Many thanks,
Max _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
_______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org
-- Andrew W. Steiner Joint Faculty Asst. Prof. at UTK/ORNL https://neutronstars.utk.edu/
participants (4)
-
Matthew Turk
-
Maximilian Fabricius
-
Michael Zingale
-
Steiner, Andrew (Andrew W. Steiner)