From: Alan W. I. <ir...@be...> - 2017-12-27 20:00:18
|
On 2017-12-26 17:07-0800 Eckhard Krotscheck wrote: > Hi All > > .. I am new to this list. Trying to migrate from pgplot to plplot > > I have a problem with plscmap1l . The documentation gives on page 140 the > call > > plscmap1l ( itype , npts , intensity , coord1 , coord2 , coord3 , > alt_hue_path ); Hi Eckhard: See <http://plplot.org/docbook-manual/plplot-html-5.13.0/API.html> for an overview of the documentation of our API especially the redacted form (all redundant dimensions dropped since the language arrays themselves carry the dimension information) which occurs now for all our languages other than C (and C++ for now, but we plan to change to redacted form in that case as well). The other general advice there is to look carefully at our examples to see how our language binding API is used in practice. In particular, the redacted form of plscmap1l is given in the last part of <http://plplot.org/docbook-manual/plplot-html-5.13.0/plscmap1l.html> (and also in the equivalent pdf documentation) as plscmap1l(itype, intensity, coord1, coord2, coord3, alt_hue_path) i.e., the redundant (in Fortran and most other languages) npts *must* be dropped from the call. > > however if I I enter the entry npts I get an error message. > > For example, the example x20f.f90 > contains the call > > call plscmap1l(.true., pos, r, g, b, rev) > > if I change this to > > call plscmap1l(.true., 2, pos, r, g, b, rev) > > > > > for 2 sample points I get the error message > > x20f.f90:613:50: > > call plscmap1l(.true., 2, pos, r, g, b, rev) > 1 > Error: There is no specific subroutine for the generic ‘plscmap1l’ at (1) Note before each release I am careful to check that each of our standard examples in all languages builds and runs without issues and produces the same results as that same example written in all our supported languagues. So you did absolutely the correct thing by looking at a Fortran example to learn how to call plscmap1l, but you should have followed the example exactly, i.e., use the redacted form of the API for Fortran. Note also if you consult that example (or the documentation of plscmap1l), that pos, r, g, and b all have the same number of points, but rev must always have one less. If the plscmap1l call doesn't follow that constraint, then that Fortran routine generates a warning message. Thank you for your interest in PLplot. I haven't tried pgplot in a long time but I understand there are many similarities with PLplot since PLplot was originally designed using pgplot as a model back in the 1980's. However, there has been a lot of water under the bridge since then so you will also find many differences (e.g., I presume the redacted dimensions for the Fortran case are one such instance). Anyhow, continue to ask questions here as you transition from pgplot, and you should be okay. 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); 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 __________________________ |