petsc-3.10.5 2019-03-28
Report Typos and Errors

# PetscDrawRealToColor

Maps a real value within an interval to a color. The color is an integer value in the range [PETSC_DRAW_BASIC_COLORS to 255] that can be passed to various drawing routines.

### Synopsis

    #include <petscdraw.h>
    int PetscDrawRealToColor(PetscReal value,PetscReal min,PetscReal max)

Not Collective

### Input Parameter

| value | - value to map within the interval [min,max]
| min | - lower end of interval
| max | - upper end of interval

### Notes

Values outside the interval [min,max] are clipped.

### See Also

PetscDrawPointPixel(), PetscDrawPoint(), PetscDrawLine(), PetscDrawTriangle(), PetscDrawRectangle()

### Level

intermediate

### Location

src/sys/classes/draw/../../../../include/petscdraw.h
Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages