On 2017-12-27 17:05-0800 Eckhard Krotscheck wrote:
Hi Allan
thanks for the comment. My issue has been caused by a slightly
different problem: First, I am used to older versions of Fortran where
the called subroutine knows nothing about the size of the arrays
that are in the call. So I expected that one must, just line in C,
tell the subroutine the size of the array.
The solution was the following:
integer, parameter :: NL2 = 17
real(kind(0.d0)) P(NL2), R(NL2), G(NL2), B(NL2)
logical rev(NL2)
.
.
.
call plscmap1l(.true., p(1:nl2), r(1:nl2), g(1:nl2), b(1:nl2), rev(1:nl2))
worked
whereas
call plscmap1l(.true., p, r, g, b, rev)
did not work, rather it seems that it assumed that it was supposed to have
only
2 intensities
Hi Eckhard:
Please keep this discussion on list so everyone reading it now and in
the future via the list archive can potentially benefit.
What version of fortran compiler, operating system? What version of
PLplot? Do you use any special CMake options to influence our build system?
The reason I ask is I just don't understand the results you are
getting. For example, as far as I know p(1:nl2) and p (and similarly
for the rest) should act identically as arguments. Also, did plscmap1l
emit a warning because rev was the wrong size (1 too large) above? It
should have, but you didn't mention it so I am wondering if somehow
you are accessing a really old version of our Fortran binding.
I should say that I need so many intensity points because I want to mimick a
color
map that has been generated by Mathematica according to a mysterious
alogorithm
Since you seem to be one of the developers, here is another question:
The manual says that the routine does a linear interpolation. I did
num_col = 255
call plscmap1n(num_col)
but I still got exactly 17 colors.
PLplot has two colour maps. cmap0 uses arbitrary discrete colours in
no particular order while cmap1
(set for example by plscmap1l and plscmap1n) uses colours which
are continuous (vary smoothly through their entire range using
a floating point index that ranges from 0 to 1.
Please look at
http://plplot.org/docbook-manual/plplot-html-5.13.0/plscmap1n.html and
follow the link there to discussion of cmap1.
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
__________________________
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general