From: Hazen Babcock <hbabcock@ma...>  20110506 19:39:24

On 05/06/2011 01:33 PM, Robbeloth, Michael C CTR USAF AFMC AFRL/RBSD wrote: > 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 Michael, I don't think you need to worry too much about plwind unless you are planning on changing the azimuthal viewing angle of the plot, just find some setting that you like and it should be good. For plw3d you'll need to figure out the min and max of the data for each axis, then use that (or some multiple of it) to set the min/max for the various axises, leaving the first 3 parameters as 1.0 (or whatever your preference is). Hazen 
From: Robbeloth,
Michael C CTR USAF AFMC AFRL/RBSD <Michael.R<obbeloth.ctr@wp...>  20110506 01:11:46
Attachments:
Message as HTML

Hello, Given the following set of gnuplot commands, how can I create the equivalent plot in plplot: set title 'Tip Deflection' set term x11 unset key set zlabel 'dz' set ylabel 'dy' set xlabel 'dx' _gnuplot_error = 1 splot '' title 'Datafile 12' with lines ; _gnuplot_error = 0 0.0 0.0 0.0 6.33650180773E6 3.59507699157E7 0.00108860742542 3.62627138539E4 9.64261859507E7 0.0077658642054 0.00103258513631 7.0062247613E6 0.013047247334 2.34646337412E4 6.6877122162E7 0.00622592559896 2.89297149949E5 5.09248661184E6 0.00223425348094 3.13846138408E5 2.14817952244E7 0.00229304110169 1.34158756145E4 4.13839696473E6 0.00479188197301 0.00101444403037 6.98171994971E6 0.0129021598223 5.37220447035E4 9.42137453306E6 0.00939036903997 5.26252760973E5 3.03673906032E6 0.00295768205803 e if (_gnuplot_error == 1) print '_ERROR_' quit 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. Michael C. Robbeloth Consultant Data Science Automation Inc. RiskFree Automation Results for your Enterprise! Certified Experts in Automation Engineering to Design, Control, Test, & Adapt http://www.dsautomation.com 
From: Alan W. Irwin <irwin@be...>  20110506 02:20:23

On 20110505 20:530400 Robbeloth, Michael C CTR USAF AFMC AFRL/RBSD wrote: > > Hello, > > > > Given the following set of gnuplot commands, how can I create the equivalent plot in plplot: > > > > set title 'Tip Deflection' > > set term x11 > > unset key > > set zlabel 'dz' > > set ylabel 'dy' > > set xlabel 'dx' > > _gnuplot_error = 1 > > splot '' title 'Datafile 12' with lines ; _gnuplot_error = 0 > > 0.0 0.0 0.0 > > 6.33650180773E6 3.59507699157E7 0.00108860742542 > > 3.62627138539E4 9.64261859507E7 0.0077658642054 > > 0.00103258513631 7.0062247613E6 0.013047247334 > > 2.34646337412E4 6.6877122162E7 0.00622592559896 > > 2.89297149949E5 5.09248661184E6 0.00223425348094 > > 3.13846138408E5 2.14817952244E7 0.00229304110169 > > 1.34158756145E4 4.13839696473E6 0.00479188197301 > > 0.00101444403037 6.98171994971E6 0.0129021598223 > > 5.37220447035E4 9.42137453306E6 0.00939036903997 > > 5.26252760973E5 3.03673906032E6 0.00295768205803 > > e > > if (_gnuplot_error == 1) print '_ERROR_' > > quit > > > > 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. Hi Michael: I am not familiar with gnuplot (last time I used it was in 1996 or so) so could you explain your use case in a lot more detail? Obviously, you have some data to plot, but at this point I don't know for sure whether it is 2D or 3D data or whether it is experimental data, something you can generate from a simple function, or something that is the result of extensive calculations. In the first case, I would read the experimental data into whatever language you prefer to work with (Python, C, or whatever). In the second and third cases, you can probably call PLplot directly from the programme that produced the data if the calculation is done in one of our many supported computer languages. Are you sure you want to create a plot similar to example 18? The only way that would make sense is if your data is in the form of a line (as opposed to a surface) in 3D space. If that happens to be the case, then first try to get an unmodified version of example 18 to work in the language of your choice, and we can take it from there. 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 equationofstate 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). __________________________ Linuxpowered Science __________________________ 
From: Hazen Babcock <hbabcock@ma...>  20110506 15:06:47

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.0e6 ymax = 1.0e5 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.0e6, 1.0e5, 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.33650180773E6, 3.62627138539E4, 0.00103258513631, 2.34646337412E4, 2.89297149949E5, 3.13846138408E5, 1.34158756145E4, 0.00101444403037, 5.37220447035E4, 5.26252760973E5]) y = numpy.array([0.0, 3.59507699157E7, 9.64261859507E7, 7.0062247613E6, 6.6877122162E7, 5.09248661184E6, 2.14817952244E7, 4.13839696473E6, 6.98171994971E6, 9.42137453306E6, 3.03673906032E6]) 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() 
From: Robbeloth,
Michael C CTR USAF AFMC AFRL/RBSD <Michael.R<obbeloth.ctr@wp...>  20110506 17:34:12

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. RiskFree Automation Results for your Enterprise! Certified Experts in Automation Engineering to Design, Control, Test, & Adapt http://www.dsautomation.com Original Message From: Hazen Babcock [mailto:hbabcock@...] Sent: Friday, May 06, 2011 11:07 AM To: Robbeloth, Michael C CTR USAF AFMC AFRL/RBSD Cc: plplotgeneral@... Subject: Re: [Plplotgeneral] 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.0e6 ymax = 1.0e5 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.0e6, 1.0e5, 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.33650180773E6, 3.62627138539E4, 0.00103258513631, 2.34646337412E4, 2.89297149949E5, 3.13846138408E5, 1.34158756145E4, 0.00101444403037, 5.37220447035E4, 5.26252760973E5]) y = numpy.array([0.0, 3.59507699157E7, 9.64261859507E7, 7.0062247613E6, 6.6877122162E7, 5.09248661184E6, 2.14817952244E7, 4.13839696473E6, 6.98171994971E6, 9.42137453306E6, 3.03673906032E6]) 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 costeffective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgoldsd _______________________________________________ Plplotgeneral mailing list Plplotgeneral@... https://lists.sourceforge.net/lists/listinfo/plplotgeneral 
From: Hazen Babcock <hbabcock@ma...>  20110506 19:39:24

On 05/06/2011 01:33 PM, Robbeloth, Michael C CTR USAF AFMC AFRL/RBSD wrote: > 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 Michael, I don't think you need to worry too much about plwind unless you are planning on changing the azimuthal viewing angle of the plot, just find some setting that you like and it should be good. For plw3d you'll need to figure out the min and max of the data for each axis, then use that (or some multiple of it) to set the min/max for the various axises, leaving the first 3 parameters as 1.0 (or whatever your preference is). Hazen 