Skip to main content
  • Home
  • Documentation
  • FAQ
  • Downloads
  • Support
  • Current Release Notes
  • Ferret Users Guide
    • Users Guide Index
    • Commands Reference
    • 1. Introduction
    • 2. Data Set Basics
    • 3. Variables & Expressions
    • 4. Grids & Regions
    • 5. Animations & Gif Images
    • 6. Customizing Plots
    • 7. Handling String Data Symbols
    • 8. Working with Special Data Sets
    • 9. Computing Environment
    • 10. Converting to NetCDF
    • 11. Writing External Functions
    • Glossary
    • Appendix A: Functions
    • Appendix B: PPLUS Guide
    • Appendix C: Ferret-Specific PPLUS Enhancements
  • Previous Release Notes
  • Tutorials and Demos
    • Ferret Tour
    • DSG files: Discrete Sampling Geometries Demo
    • Ferret sorting demo
    • Fast Fourier Transforms demo
    • Empirical Orthogonal Functions demo
    • Ferret objective analysis demo
    • Ferret Palette Demo
    • Map projections
    • Ferret polygon vector demo
    • Ferret Graticules demo
    • Ferret Polytube Demo
    • Ferret Polymark Demo
    • Ferret Constant-Array demo
    • Ferret land_detail demo
    • COADS Tour
    • Levitus Tour
    • Use OPeNDAP
    • Ferret binary read demo
  • PyFerret
    • PyFerret Downloads and Install ../../faq/ferret-faqs.html
    • What is PyFerret?
    • Why use PyFerret?
    • PyFerret for the Ferret user
    • PyFerret command syntax: quick-start notes
    • PyFerret for the Python user
    • Graphics in PyFerret ?
    • New Ferret functionality
    • PyFerret Python functions and constants
    • PyFerret Python objects and methods
    • Ferret external functions in Python
    • Ferret Fortran external functions
    • PyFerret metadata-and-data dictionaries
  • OPeNDAP
    • OPeNDAP usage in Ferret
    • Use OPeNDAP Demo
    • Test OPeNDAP

6.6 FONTS

 

6.6.1 Ferret font and text color

 

In PyFerret, make font and text-style settings with the SET TEXT command. Change to any of the true fonts available to the python libraries, change to custom colors, and use bold or italic styles. Define a global text style, or customize text groupings, to control the style of, for instance the colorbar labels, the labels on axis tic marks, or the main plot title.  The following applies to classic Ferret and t

By default, Ferret produces all plot labels using the fonts ASCII Simplex (code AS) and ASCII Complex (code AC). For upper and lower case letters these fonts are identical to the fonts Simplex Roman (SR) and Complex Roman (CR), respectively. In addition, however, fonts AS and AC include the complete set of ASCII punctuation characters and ignore the special PPLUS interpretations of the characters "^" (superscript), "_" (subscript), "\" (backspace) and "@" (change font or pen). Using a text e

The details for changing the color of labels are listed in the PPLUS appendix, pen selection.

Details about using special characters for text editing, "^" (superscript), "_" (subscript), and "\" (backspace) are also found in the PPLUS appendix.

 

The Ferret command CANCEL MODE ASCII causes Ferret to generate PPLUS labels which have the font unspecified. When the font is unspecified the PPLUS command DFLTFNT determines the default font and PPLUS responds to the special characters "^", "_", and "@". SET MODE ASCII restores normal font behavior.

6.6.2 PPLUS font and text color commands

PPLUS commands can be used to customize the font settings. See the examples below, and the section on PPLUS graphical commands for more on the syntax to make PPLUS calls.

Note that many ASCII punctuation characters are printable only in ASCII simplex and complex fonts. In all other fonts these characters "@", "^", and "_" have special meanings: @ = font change; ^ = superscript; _ = subscript.

Examples

1) axis labels in custom fonts (Figure 6_7)

Ch6_fig07

yes? PLOT/SET/i=1:10/NOLAB 1/i
yes? PPL XLAB @CImy x-axis label
yes? PPL YLAB @GEmy y-axis label
yes? PPL PLOT

 

2) set default font for all labeling (Figure 6_8)

Ch6_fig08

yes? CANCEL MODE ASCII
yes? PPL DFLTFNT CS !complex script
yes? PLOT/I=1:100/TITLE="sin curve" sin(i/6)
yes? SET MODE ASCII
yes? PPL DFLTFNT SR !numeric axis labels unaffected by SET MODE ASCII