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 |