Giter Site home page Giter Site logo

cpgplot's Introduction

Wellcome to CPGPLOT Graphix Library

This project runs on linux machines out of the box. To run in other platforms makefiles should be modified accordingly.

CPGPLOT Graphix Library.

This is a set of functions written in C relying on cpgplot primitives from pgplot, and plplot. The follwing dependencies are required:

What is this repository for?

  • This repository includes code to produce high quality 2D plots based on pgplot. In addition, it implements some extra examples from PLPLOT to produce 3D plots. Most library functions are simple wrappers for pgplot native functions and call the respective C bindings functions (cpgplot). The library is based on two basic data structures: 'Parameter_CPGPLOT' and 'Parameter_FILE'. Both data structures are defined in the header files Parameter_CPGPLOT.h and Parameter_FILE.h, respectively. The structure 'Parameter_CPGPLOT' has 'Parameter_FILE' as one of its members. The first struct packs fine-tunning plotting parameters. The second one encapsulates information about the files containing the data to plot. Both structures handle a bunch of input parameters such as, for instance, the files to read, the characteristics of the plot, etc. All these arguments can be given as input arguments as invoking the main program to produce the plots. A variable usually named CPG of type 'Parameter_CPGPLOT' is passed on as a pointer to each library function when they are called from parent code.

  • Version 0.0.99

  • Learn Markdown

How do I get set up?

First you should install the libraries to meet the dependencies mentioned above. Look for pgplot and libplplot12 in your usual package handler. Notice that the linking command in makefiles of code you may develop should contain, at least, the following libraries:

  • -lX11 -lpng -lplplotd -lpgplot -lcpgplot

  • -lda_cpgplot_XY_GRID_FILE -lda_cpgplot_BASIC

  • Summary of set up:

    • 1. Install plplot library

    • 2. Install pgplot library

    • 3. git clone CPGPLOT Graphix library. This will create the directory ~/CPGPLOT/

    • 4. Install the CPGPLOT Graphix library. Simply do:

      • ~$ cd ~/CPGPLOT/library/
      • ~$ make
      • ~$ cd ~/CPGPLOT/library_basic_UTL/
      • ~$ make

      This should create the corresponding files libda_cpgplot_XY_GRID_FILE.a and libda_cpgplot_BASIC.a

    • 5. Tests:

    In order to test if pgplot, plplot and CPGPLOT are correctly installed in your machine, you go to the directory ~/CPGPLOT_EXAMPLES. In that directory, there is a simple example of how to use the CPGPLOT library. You build it by typing:

    • ~/CPGPLOT/CPGPLOT_EXAMPLES/make

    and you will get the exectutable file PLOT. You may run the example with some command arguments (see main.c). For instance,

    • ~/CPGPLOT/CPGPLOT_EXAMPLES/PLOT -G0 2 -G1 2 -G2 1 -G3 0 -G4 6.0 -G5 1 -G6 0.0 -G7 1.0

    You should get a graph with four different subplots. You may also type:

    • ~/CPGPLOT/CPGPLOT_EXAMPLES/PLOT -h

    and see other available command line arguments. You may also type:

    • ~/CPGPLOT/CPGPLOT_EXAMPLES/PLOT -G29 ?

    and see the different available graphic formats in which plots can be saved. The value for these input arguments can be overriden by the internal program code. You may have a good reason to do it, for instance, the necessity to produce several plots with different parameters as program executions proceeds. If you are in the mood, make moodfications at your own risk. Be creative.

Contribution guidelines

  • Writing tests
  • Code review
  • Other guidelines

Who do I talk to?

cpgplot's People

Contributors

vankampen92 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.