From: Peter G. <pe...@sp...> - 2007-09-29 23:16:25
|
Hi, Kudos to the developers, I'm finding vtk to be a promising alternative for plotting in octave. A quick question... most of my plots are intended to be printed and are generated from scripts. Is there a view() function which allows specification of the viewing angles? I try to avoid interactive generation of plots since I'm generating many, particularly I want to avoid the mouse. Thanks, Pete |
From: Jonathan S. <jjs...@vc...> - 2007-10-01 14:07:58
|
Hi Pete Glad you like octaviz. There is not yet a "view" function, but you are welcome to make one and submit it to one of the "trackers" on the sourceforge project page. The code to use is something like f=vtk_figure(0); f.renderer.GetActiveCamera().SetPosition(x,y,z); Actually, you can just use this code to set your camera without making a view function, but a contribution would be welcome! I am stuck with my development efforts at the moment since I can't get octaviz to compile on my Mac... Regards, Jonathan Peter Gustafson wrote: > Hi, > > Kudos to the developers, I'm finding vtk to be a promising alternative > for plotting in octave. > > A quick question... most of my plots are intended to be printed and are > generated from scripts. Is there a view() function which allows > specification of the viewing angles? I try to avoid interactive > generation of plots since I'm generating many, particularly I want to > avoid the mouse. > > Thanks, > > Pete > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Octaviz-help mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octaviz-help > > |
From: Peter A. G. <pe...@sp...> - 2007-10-02 16:14:38
|
On Monday 01 October 2007 10:07:29 am Jonathan Stickel wrote: > Hi Pete > > Glad you like octaviz. There is not yet a "view" function, but you are > welcome to make one and submit it to one of the "trackers" on the > sourceforge project page. The code to use is something like > > f=vtk_figure(0); > f.renderer.GetActiveCamera().SetPosition(x,y,z); > > Actually, you can just use this code to set your camera without making a > view function, but a contribution would be welcome! I am stuck with my > development efforts at the moment since I can't get octaviz to compile > on my Mac... > > Regards, > Jonathan Hi again, OK, I'm looking into a view function but have to admit some of the vtk syntax is (as of yet) non-intuitive to me. I'll keep plugging away as I find time. A few other questions: 1) When using vtk_plot3() followed by vtk_axis("square"), the points are scaled and look like ovoids... is there a way to avoid this? 2) When plotting vtk_contour() followed by vtk_contour() (I want lines and colors in the same plot), they do not end up on the same z position. Is this expected? Thanks again, keep up the good work. Pete |
From: Jonathan S. <jjs...@vc...> - 2007-10-04 15:01:59
|
Peter A. Gustafson wrote: > 2) When plotting vtk_contour() followed by vtk_contour() (I want lines and > colors in the same plot), they do not end up on the same z position. Is this > expected? > Which two functions do you want to use together? Jonathan |
From: Jonathan S. <jjs...@vc...> - 2007-10-11 17:01:51
|
Peter A. Gustafson wrote: > Hi, > > On Friday 05 October 2007 09:59:05 am you wrote: >>> Hi, >>> vtk_contour and vtk_contourf. I think vtk_contourf actually does what I >>> want, however in some plots the black contour lines do not show up. >> Can you provide an example where the lines do not show? > > After more testing... I think the lines are present in general but not visible > in the screen when viewed from different perspectives. If/when I get a > better handle on this, I will provide more detail. > >>> When using either as a standalone function, it would be nice if I could >>> turn the zaxis labels etc off. I think this can be done but I don't >>> know how. >> If you look in vtk_contour.m, there is a commented line near the bottom: >> >> %f.axes.YAxisVisibilityOff(); >> > > I tried this and it seems to work _most_ of the time, though not all the time. > I would turn it back on if I were you, as I would say it is better to error > on the side of working most of the time than having extra labels present all > of the time. > Changed in CVS. >>> In working on a view function, I'm running into trouble printing to pdf >>> (tex) where labels are clipped. I see: >>> >>> f.renderer.GetActiveCamera().SetClippingRange(...); >>> >>> Is this how I would ensure that all labels are printed? >> Not sure off hand. Can you provide an example where you are having >> trouble? > > Try the following: > > [x,y,z]=peaks(); > f=vtk_figure(0); > vtk_blackonwhite; > vtk_meshc(x,y,z); > vtk_axis("square"); > f.renderer.GetActiveCamera().SetPosition(-1, -1.25, .3); > f.renderer.GetActiveCamera().SetFocalPoint(0,0,0); > f.renderer.GetActiveCamera().SetViewAngle(5); > f.renderer.GetActiveCamera().SetViewUp(0., 0., 1.); > f.renderer.GetActiveCamera().SetClippingRange(0, 10); > f.renderer.GetActiveCamera().SetParallelScale(0.87); > f.window.SetSize(400,400); > vtk_update(f); > vtk_xlabel("x"); > vtk_ylabel("y"); > vtk_zlabel("zzzzzzzz"); > vtk_print("test.tex","-dpdf","-tex","-vect"); > > For me, the zlabel doesn't show. It does show up if it is a single character > z, or if I move the plot with the mouse so that the zzzzs are in the middle > of the plot. This is an issue with the postscript/pdf converter (GL2PS). I get the same behavior (the zzzz label not showing) if I just print straight to pdf without the -tex flag. The suggestion I have at the moment is to change the aspect ratio of the window like this: f.window.SetSize(500,400); This solves the problem for your particular example. It should also be possible to use SetFocalPoint, SetDistance, etc., to adjust the placement of the figure in the window, but I haven't yet figured out how to then update the rendering without resetting all of these... Let me know if you have any success with those commands. > > Another question, can fon't sizing be turned off. I want identical font sizes > managed by tex. > At the moment I can only suggest that you post-process your .tex file. Perhaps something like: sed -i -e /fontsize/d test.tex will work for you. Regards, Jonathan |
From: Peter A. G. <pe...@sp...> - 2007-10-12 04:27:42
|
On Thursday 11 October 2007 13:01:45 you wrote: > Peter A. Gustafson wrote: > > This is an issue with the postscript/pdf converter (GL2PS). I get the > same behavior (the zzzz label not showing) if I just print straight to > pdf without the -tex flag. The suggestion I have at the moment is to > change the aspect ratio of the window like this: > > f.window.SetSize(500,400); > Yes, I had just tried this and found it to work OK. However I don't really consider it to be a general solution. No complaints though... it works and I'm gladly using it. > This solves the problem for your particular example. It should also be > possible to use SetFocalPoint, SetDistance, etc., to adjust the > placement of the figure in the window, but I haven't yet figured out how > to then update the rendering without resetting all of these... Let me > know if you have any success with those commands. > > > Another question, can fon't sizing be turned off. I want identical font > > sizes managed by tex. > > At the moment I can only suggest that you post-process your .tex file. > Perhaps something like: > > sed -i -e /fontsize/d test.tex > It appears we think alike. I've got a local vtp_printlatex file which does basically that. (actually grep -v fontsize) Ideally this would all be controlled within octaviz, but like I said I'm not complaining, it works. I'm sure there are more important things to work on. Pete |
From: Jonathan S. <jjs...@vc...> - 2007-10-13 15:41:05
|
Peter A. Gustafson wrote: > On Thursday 11 October 2007 13:01:45 you wrote: >> Peter A. Gustafson wrote: >> >> This is an issue with the postscript/pdf converter (GL2PS). I get the >> same behavior (the zzzz label not showing) if I just print straight to >> pdf without the -tex flag. The suggestion I have at the moment is to >> change the aspect ratio of the window like this: >> >> f.window.SetSize(500,400); >> > > Yes, I had just tried this and found it to work OK. However I don't really > consider it to be a general solution. No complaints though... it works and > I'm gladly using it. > >> This solves the problem for your particular example. It should also be >> possible to use SetFocalPoint, SetDistance, etc., to adjust the >> placement of the figure in the window, but I haven't yet figured out how >> to then update the rendering without resetting all of these... Let me >> know if you have any success with those commands. >> >>> Another question, can fon't sizing be turned off. I want identical font >>> sizes managed by tex. >> At the moment I can only suggest that you post-process your .tex file. >> Perhaps something like: >> >> sed -i -e /fontsize/d test.tex >> > > It appears we think alike. I've got a local vtp_printlatex file which does > basically that. (actually grep -v fontsize) Ideally this would all be > controlled within octaviz, but like I said I'm not complaining, it works. > I'm sure there are more important things to work on. > > As you know, we are all volunteers here. Sometimes the "best" solution gives way to the "easy" solution due to contributors' interest and time. I'd love to see more people using and contributing to Octaviz. Jonathan |