kill(all)$

graphicsdraw2dexamples,version 1.0
peter.vlasschaert@gmail.com, 12/04/2019.

load packages
============
personal : load
=>  load("C:/...../......../****.++++")$
general   : load
=>  load(lrats)

load(lrats)$

simple plot ' doesn't use draw '
----------------------------------------------

wxplot2d([cos(x),sin(x)],[x,-3,3],grid2d,[yx_ratio ,1 ],
[axes,solid],[title,"functions,cos(x),sin(x)."],
[label,["y",0.1,0.9],["x",2.7,0.1]]);

rem : 'wx' removed , not fixed to the notebook.

how to plot , more than one function and object.
------------------------------------------------------------------------

values : 1e)  parabolic  , 'red'.
values : 2e)  line             , 'blue'.
                3e)  polygon   , triangle ,'green,blue'.
                4e)  label          , txt           ,'black'.
                5e)  vector       , vector    ,'red    '.
======================================

values
=====

p1a: a=4;
p1b: b=-2;
p1c: c=-4;

plot , function
============

rem : default.
-------------------

general : option  'wxdraw2d'.
--------------------------------------------

set_draw_defaults(xlabel="X",ylabel="Y");

rem :   other example.  'find online'
=============================
set_draw_defaults(
                                        user_preamble="set zeroaxis linetype -1;" ,
                                        font      = "Microsoft Sans Serif",
                                        xaxis_type=solid, yaxis_type=solid,
                                        xaxis_color=black,yaxis_color=black,
                                        proportional_axes = xy
                                 )$

plot , wxdraw2d.
-------------------------

wxdraw2d(  title = "more explicit plots and objects",                    
            xrange=[-5,5],   yrange=[-5,5],
            xaxis=true,      yaxis=true,
            grid=true,            
                    key = "parabolic",
                    color=red, 
            line_width = 2,
            explicit(rhs(p1a)*x^2+rhs(p1b)*x+rhs(p1c),x,-1,4), 
                    key = "line",  
                   color=blue, 
            line_width =2,
            explicit(rhs(p1a)+rhs(p1b)*x,x,-2,2),
            line_width = 3,
                   key = "triangle",
                   border = true,                  
                   color=green,
                   fill_color = blue,
            polygon([[0,0],[2,0],[2,2]]),   
                  color = black , 
            label (["abc",-2,2]),
                   key ="vector",     
                   color = red,
                  head_length = 0.2, 
                  head_type = 'nofilled,
           vector([3,0],[1,0])
             
          );

function : explicit,                          'command'.
object     : polygon,label,vector, 'command'.

'-----------------------------------------------------------------------------------------------------------------------------'