Hazen, Thank you for the suggestion. That worked a lot better (I'm using Java). The trouble I have is with specifying the world coordinates of the viewport and then setting up the window for 3D in a programmatic way, which is what led to my original problem. What strategy would you (or others) suggest for letting plwind and plw3d float based on the supplied data. Thanks.
Michael C. Robbeloth Consultant Data Science Automation Inc. Risk-Free Automation Results for your Enterprise! Certified Experts in Automation Engineering to Design, Control, Test, & Adapt www.dsautomation.com -----Original Message----- From: Hazen Babcock [mailto:[email protected]] Sent: Friday, May 06, 2011 11:07 AM To: Robbeloth, Michael C CTR USAF AFMC AFRL/RBSD Cc: [email protected] Subject: Re: [Plplot-general] 3D Line Plot GNUPlot and PLPLOT equivalent On 05/05/2011 08:53 PM, Robbeloth, Michael C CTR USAF AFMC AFRL/RBSD wrote: > Everything just plots nicely for me in gnuplot, but despite fighting > with various settings for viewports, windows, and boxes, I cannot > recreate the same plot using plplot. If someone could give me some > pointers, that would be great. I have also looked at example 18 and tied > to follow its structure without success. Thank you. The Python program below should give you roughly the same thing, though I'm not sure exactly which feature of gnuplot plot you were trying to recreate. The trick to getting the box at the bottom of the plot is that you have draw it yourself. -Hazen #!/usr/bin/python import numpy import plplot plplot.plsdev("xwin") xmin = -0.0012 xmax = 0.0 ymin = -6.0e-6 ymax = 1.0e-5 zmin = -0.015 zmax = 0.015 plplot.plinit() plplot.pladv(0) plplot.plvpor(0.0, 1.0, 0.0, 0.9) plplot.plwind(-1.0, 1.0, -0.9, 1.1) plplot.plcol0(1) #plplot.plw3d(1.0, 1.0, 1.0, -6.0e-6, 1.0e-5, -0.0012, 0.0, -0.015, 0.015, 60.0, 30.0) plplot.plw3d(1.0, 1.0, 1.0, xmin, xmax, ymin, ymax, zmin, zmax, 60.0, 30.0) plplot.plbox3("bnstu", "dx", 0.0, 0, "bnstu", "dy", 0.0, 0, "bcmnstuv", "dz", 0.0, 0) plplot.plcol0(2) x = numpy.array([0.0, -6.33650180773E-6, -3.62627138539E-4, -0.00103258513631, -2.34646337412E-4, -2.89297149949E-5, -3.13846138408E-5, -1.34158756145E-4, -0.00101444403037, -5.37220447035E-4, -5.26252760973E-5]) y = numpy.array([0.0, -3.59507699157E-7, 9.64261859507E-7, 7.0062247613E-6, 6.6877122162E-7, -5.09248661184E-6, 2.14817952244E-7, -4.13839696473E-6, 6.98171994971E-6, 9.42137453306E-6, -3.03673906032E-6]) z = numpy.array([0.0, -0.00108860742542, -0.0077658642054, -0.013047247334, -0.00622592559896, 0.00223425348094, 0.00229304110169, 0.00479188197301, 0.0129021598223, 0.00939036903997, -0.00295768205803]) plplot.plline3(x, y, z) plplot.plcol0(3) plplot.plmtex("t", 1.0, 0.5, 0.5, "Tip Deflection") plplot.plcol0(1) meshx = numpy.array([xmin, xmax]) meshy = numpy.array([ymin, ymax]) meshz = numpy.zeros((2,2)) + zmin plplot.plmesh(meshx, meshy, meshz, plplot.DRAW_LINEXY) plplot.plend() ------------------------------------------------------------------------ ------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Plplot-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-general ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Plplot-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-general
