From: Alan W. I. <ir...@be...> - 2009-01-19 19:00:08
|
On 2009-01-19 09:37-0600 Lukas wrote: > > I’m not sure whether or not this is the correct way to post a question on > the plplot-general mailing list. Is I do this wrong, can anyone tell me the > correct way? > > > > My Question: > > I'm new to PLplot. Previously I use GNUplot but then had problem with > plotting speed when plotting too many points. Anyway, can anyone tell me if > PLplot is the right tool to go? > > Criteria: > - one window with 4 subplot. Top half plot ONE 3-D plot and bottom half has > THREE 2-D plots. > - Plot 10,000 - 20,000 points (I don't need to plot surface or lines, just > points). > - has to be fast (My program will keep on refreshing the plot). > > My next question is that I tried to create a 3D plot in PLplot, but I want > to have grids on the x-z and y-z plane, just like example 11 in PLplot > website: http://plplot.sourceforge.net/examples.php?demo=11. > My Understanding is that I need to use add a letter 'd' inside the function > plbox3(..), but the grid will only be showed after we call either > plot3d(...) or plmesh(...). > > The thing is I only want to plot a point in the 3D plane so I only use > plpoin3(...). And no grid is showed. > > Do I miss something? Is there an easy way to plot grid? Is there another way > to get what I want? > > thanks so much for the help. Before delving into the question of a background grid, are you happy with the speed of plpoin3 for large numbers of points? No promises, but if you show us there is an efficiency problem for that use case, we might be able to do something for you. To follow what is going on with the background grid, I will walk you through the relevant documentation and example plots. http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.2/plpoin3.html states plpoin3 is used in example 18. If you check that example (http://plplot.sourceforge.net/examples.php?demo=18), you will see it uses the "d" option for zopt in plbox3, but from the plot results that option is ignored. That is consistent with http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.2/plbox3.html which says "d" only produces background grid lines for plot3d or plmesh. If you follow up by looking at http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.2/plot3d.html and http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.2/plmesh.html those routines are used in example 11. So to see what those background grid lines look like, have a look at http://plplot.sourceforge.net/examples.php?demo=11. I assume the judgement call made when the background grid line logic was put together was such grid lines would not look good for the plline3 and plpoin3 cases. However, if you still want the grid lines, I suggest you might try a call to plmesh or plot3d that plots no visible surface so the net visual effect is just the grid lines. Probably the easiest way to arrange that is to make a minimal plmesh with the x and y points outside the plotted range before you call plpoin3. Hope that idea helps. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |