Silverfrost Forums

Welcome to our forums

%pl guide

19 Sep 2025 4:08 #32349

Eddie, it does not change the intention of the last example but the assignment for z should be:

z = spread(sin(x), 2, size(y)) * spread(cos(y), 1, size(x)) + &
      0.5d0 * spread(sin(2.0d0*x), 2, size(y)) * spread(cos(2.0d0*y), 1, size(x))

I should have used to nested do loops! However I’m trying to keep the number of lines in these examples small – hence the use of spread.

Bands are a good idea. Here is a very slightly modified version of the example which allows the plot to be drawn with different numbers of levels:

https://www.dropbox.com/scl/fi/h2svtrszccn1dpi8l3y7d/ex31_new.f95?rlkey=66mkzu6wctmqw1zspyj1fzvz0&st=v42sm89i&dl=0

There is a very good discussion of colour ramps to be found here:

https://paulbourke.net/miscellaneous/colourspace/

24 Sep 2025 12:13 #32355

Eddie,

Viridis, Inferno, Plasma, Magma and Cividis colourmaps are designed so that equal steps in the data value correspond to equal perceptual steps in colour. They are designed to remain distinguishable by people with common forms of colour blindness.

Created by Stéfan van der Walt, Nathaniel Smith, and Eric Firing for Python/Matplotlib. Licence: CC0 1.0 Universal (public domain).

The licence makes them easy to adopt in Clearwin+.

Some of the later examples I plan to add to the guide will use these.

24 Sep 2025 12:34 #32356

Hi Ken,

Did you intend to provide a link?

I thought the Bourke stuff was interesting.

Eddie

24 Sep 2025 2:21 #32357

Eddie,

The first link is useful. Has other links too.

The second gives the full mapping (but not a particularly Fortran friendly format)!

https://waldyrious.net/viridis-palette-generator/

https://github.com/BIDS/colormap/blob/master/colormaps.py

Please login to reply.