Hello,

when using this example code,
I got graphics that are rotated,
and where also parts of the graics are
missing.

This is experimental code, so it possibly contains
unused code and could be done nicer,
but that was, what I used...
...I didnt' wanted to make it cleaner, because by accident I might
throw out the part that makes the problem.

It seems to be a problem of the plplot-lib,
that the graphics is not displayed correctly.
Or did I missed something in the initialization
to make that working?

Ciao,
   Oliver

And now the code:

====================================================================
#include <stdio.h>
#include <stdlib.h>

#include <plplot.h>


static PLFLT data_size_pflt[1] = {0.0};
static PLFLT x_data[100] = {0.0, 10.0, 20.0};
static PLFLT y_data[100] = {0.0, 12.0, 33.0,
   4096.0,
   2901.0,
    202.0,
      0.0,
   1615.0,
   6756.0,
   5578.0,
    585.0,
   1626.0,
 };



int main( int argc, char* argv[] )
{
  int idx = 0;

  /* set up data */
  for( idx = 0; idx < sizeof(x_data) / sizeof(data_size_pflt); idx++ )
  {
    x_data[idx] = 10.0 * idx;
  }


  if( 0 )
  {
    plsetopt("dev", "png");
    plsetopt("o",   "out.png");
  }
  else
  {
    plsetopt("dev", "ps");
    plsetopt("o",   "out.ps");
  }

  plsetopt( "-geometry", "1024x800" );
  plssub(2,2);

  plscolbg (255, 255,240);

  plsdiori(0.4);

  /* ******************************************************** */
  /*                        INIT                              */
  /* ******************************************************** */
  plinit();
  plcol1(0.4);


  plenv(0,100, 0, 10000.0, 0, 0);

  pllab("erste", "zweite", "dritte");

  /*
  */

  plptex(50,200, 0.0, 0.0,   0, "Guten Abend");
  plptex(50,400, 30.0, 0.0,   0, "Guten Abend");
  plptex(50,600, 0.0, 30.0,   0, "Guten Abend");

  pljoin( 20,44, 82, 1000);

  /* DATA plotting */

  plline(12, x_data, y_data);


  /* ----------------------------------------- */
  plcol1(0.2);
    plenv(0,100, 0, 10000.0, 0, 0);
    pllab("erste", "zweite", "dritte");

  plcol1(0.4);
    plptex(50,200, 0.0, 0.0,   0, "asjkdfh");

    /* DATA plotting */

    pljoin( 20,44, 82, 1000);
    plline(12, x_data, y_data);
  /* ----------------------------------------- */

  plcol1(0.1);

    plhist(12, y_data, 0, 10000, 100, PL_HIST_DEFAULT);


  plend();

  return 0;
}
====================================================================


__END__

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to