Hi Alan:
 
How to change the colour and size of the UTF chars on plot ?
Is possible to use different sizes and colours for them?
In attached files are simple C code with plstring and pdf.

Regards,
Sergey.

Attachment: TestX000.pdf
Description: Adobe PDF document

// Simple demo of a 2D line plot.
//
// Copyright (C) 2011  Alan W. Irwin
//
// This file is part of PLplot.
//
// PLplot is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as published
// by the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// PLplot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public License
// along with PLplot; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
//

#include "plcdemos.h"

#define NSIZE0     1

#define NSIZE1    10


int
main( int argc, const char *argv[] )
{
    PLFLT x00[NSIZE0], y00[NSIZE0];
    PLFLT x01[NSIZE0], y01[NSIZE0];
    PLFLT x02[NSIZE0], y02[NSIZE0];
    PLFLT x03[NSIZE0], y03[NSIZE0];



    PLFLT x1[NSIZE1], y1[NSIZE1];

    PLFLT xmin = 0.0, xmax = 13.0, ymin = 0.0, ymax = 13.0;
    int   i;

    // Prepare data to be plotted.

    printf("\n");
    printf("\n");

    for ( i = 0; i < NSIZE0; i++ )
    {
        x00[i] = +1.6 + xmin + ((xmax - xmin) / NSIZE0 )* i;
        y00[i] = +2.8 + ymin + ((ymax - ymin) / NSIZE0 )* i;

        x01[i] = +3.8 + xmin + ((xmax - xmin) / NSIZE0 )* i;
        y01[i] = +4.9 + ymin + ((ymax - ymin) / NSIZE0 )* i;


        x02[i] = +6.3 + xmin + ((xmax - xmin) / NSIZE0 )* i;
        y02[i] = +8.2 + ymin + ((ymax - ymin) / NSIZE0 )* i;

        printf(" 1aa. x00--> %+12.6f   y00--> %+12.6f \n", x00[i], y00[i] );

        printf(" 1ab. x01--> %+12.6f   y03--> %+12.6f \n", x01[i], y01[i] );

        printf(" 1ac. x02--> %+12.6f   y04--> %+12.6f \n", x02[i], y02[i] );


    }
    printf("\n");
    printf("\n");
    
    for ( i = 0; i < NSIZE1; i++ )
    {
        x1[i] = xmin + ((xmax - xmin) / NSIZE1 ) * i;
        y1[i] = ymin + ((ymax - ymin) / NSIZE1 )* i;
        printf(" 1b. x--> %+12.6f   y--> %+12.6f \n", x1[i], y1[i] );
    }

    printf("\n");
    printf("\n");

	plspal0( "cmap0_black_on_white.pal" );
	plspal1( "cmap1_gray.pal", 1 );
	/* Reduce colors in cmap 0 so that cmap 1 is useful on a 16-color display */
	//plscmap0n( 3 );
	plspage( 200.0, 200.0, 1024.0, 768, 10, 20 );  
	//plspage( 300.0, 300.0, 4100.0, 1600, 10, 20 );  
	
	//plsfnam("OutPUT_Rec_Z_Wavelet_Z_002a.pdf");
	//plsfnam("OutPUT_Rec_E_Wavelet_E_002a.pdf");
	//plsfnam("OutPUTWavelet_ENZ_Rec_ENZ_LTAxSTA_ENZ_020a.pdf");
	plsfnam("TestX000.pdf");
	plsdev("pdf");
	plscmap0n( 9 );

	plinit();
	plsesc( '#' );

    // Parse and process command line arguments
    //plparseopts( &argc, argv, PL_PARSE_FULL );

    // Initialize plplot
    //plinit();

    // Create a labelled box to hold the plot.
    plenv( xmin-1, xmax+1, ymin-1, ymax+1, 0, 0 );
    pllab( "X", "Y", "Diferent Points On Plot" );

    // Plot the data that was prepared above.
    plline( NSIZE1, x1, y1 );

    //plstring( NSIZE0, x0, y0, "#[0x20E0]");

    //plstring( NSIZE0, x0, y0, "#[0x20E0]");

    plstring( NSIZE0, x00, y00, "#[0x20DD]");

    plstring( NSIZE0, x01, y01, "#[0x20DE]");

    plstring( NSIZE0, x02, y02, "#[0x20DF]");
    
    // Close PLplot library
    plend();

    exit( 0 );
}
------------------------------------------------------------------------------
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

Reply via email to