Only figure 5and 6 are working correctly, other windows show only graphic
coordonnees
Regards
Henri
julia> using qwtwplot
julia> qwtwStart() # start 'qwtwc' library
julia> # draw thin blue 'sinus':
tMax = 10.
10.0
julia> t = Array(linspace(0.,tMax, 10000));
julia> n = length(t)
10000
julia> y = sin(t);
julia> qfigure(1); # "1" the number of the first plot window
julia> # parameters: 'x' and 'y' data vectors, then 'name of this line',
then 'style description', then 'line width'
qplot(t, y, "blue line", "-b", 1)
qplot: error #2
debug:
in traceit(::String) at ./REPL[28]:5
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Int64) at ./REPL[34]:20
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64) at ./REPL[35]:4
in eval(::Module, ::Any) at ./boot.jl:234
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68: error #2
julia> # add green thick another sinus:
y = sin(t .* 4.) + cos(t * 0.8);
julia> qplot(t, y, "thick green line", "-g", 4) #'x' and 'y' data vectors,
then 'name of this line', then 'style description', then 'line width'
qplot: error #2
debug:
in traceit(::String) at ./REPL[28]:5
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Int64) at ./REPL[34]:20
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64) at ./REPL[35]:4
in eval(::Module, ::Any) at ./boot.jl:234
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68: error #2
julia> qtitle("first plot window") # add a title for the first plot
ERROR: UndefVarError: Uint8 not defined
in qtitle(::String) at ./REPL[41]:3
julia> qxlabel("time (in seconds)") # put a label on X axis
ERROR: UndefVarError: Uint8 not defined
in qxlabel(::String) at ./REPL[39]:3
julia> qylabel("happiness") # put a label on Y axis
ERROR: UndefVarError: Uint8 not defined
in qylabel(::String) at ./REPL[40]:3
julia> #= By default, "ZOOM" mode is active. This means that
now you can select some part of the plot with left mouse
button.
Right mouse button will return you back to the previous
state.
And try mouse wheel also.
Button with a "hand" - it's a "pan mode". It will shift all
the plots, but not change scale.
"disk" button - allow you to save image to a file
"[]" buttom means "make square axis" i.e. make equal scale
for X and Y axis.
Real magic is in left and right buttons; see below about it.
=#
# create another plot, with high frequency signal
noise = rand(n)
10000-element Array{Float64,1}:
0.33081
0.0136264
0.168943
0.430904
0.177114
0.62316
0.195568
0.351368
0.0451744
0.0403399
⋮
0.229808
0.523299
0.8082
0.0341024
0.914545
0.111771
0.892335
0.845571
0.565631
julia> y = sin(t * 100.) + noise
10000-element Array{Float64,1}:
0.33081
0.11347
0.367632
0.726453
0.566569
1.10263
0.76026
0.995639
0.762586
0.823723
⋮
0.402396
0.79337
1.17305
0.490094
1.45712
0.735501
1.59099
1.61217
1.39251
julia> qfigure(2)
julia> qplot(t, y, "sinus + noise", "-m", 2)
qplot: error #2
debug:
in traceit(::String) at ./REPL[28]:5
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Int64) at ./REPL[34]:20
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64) at ./REPL[35]:4
in eval(::Module, ::Any) at ./boot.jl:234
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68: error #2
julia> qtitle("frequency test")
ERROR: UndefVarError: Uint8 not defined
in qtitle(::String) at ./REPL[41]:3
julia> # what is the frequency of our signal from last window?
# pless "f" button, on new small window select "sinus + noise",
# select "4" from combo box and close this small window
# after this "frequency" plot will be created
# add another line to the first plot:
t1 = Array(linspace(0.,10., 5))
5-element Array{Float64,1}:
0.0
2.5
5.0
7.5
10.0
julia> y1 = cos(t1 * 0.5)
5-element Array{Float64,1}:
1.0
0.315322
-0.801144
-0.820559
0.283662
julia> qfigure(1); # switch back to the first plot
julia> # if we do not need the lines, only symbols:
qplot1(t1, y1, "points and line", " eb", 30)
ERROR: UndefVarError: Uint8 not defined
in qplot1(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64) at ./REPL[36]:7
julia> # parameters: 'x' and 'y' data vectors, then 'name of this line',
# then 'style description', then 'line width', and "symbol size"
qplot(t1, y1, "points and line", "-tm", 2, 10)
qplot: error #2
debug:
in traceit(::String) at ./REPL[28]:5
in qplot(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Int64) at ./REPL[34]:20
in eval(::Module, ::Any) at ./boot.jl:234
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68: error #2
julia> #= now, try to use an arrow burtton: it will draw a marker on all
the plots.
Next, select some region on one of the plot with ZOOM tool;
and press right "clip" button.
All the plots will zoom to the same region.
There is a bug with "top view" plots, but it can be fixed.
=#
# create a circle on another plot window:
x = sin(t*2.*pi/tMax); y = cos(t*2.*pi/tMax)
10000-element Array{Float64,1}:
1.0
1.0
0.999999
0.999998
0.999997
0.999995
0.999993
0.99999
0.999987
0.999984
⋮
0.999987
0.99999
0.999993
0.999995
0.999997
0.999998
0.999999
1.0
1.0
julia> qfigure(3);
julia> qplot2(x, y, "circle #1", "-r", 2, t)
ERROR: UndefVarError: Uint8 not defined
in qplot2(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Array{Float64,1}) at ./REPL[37]:7
julia> qtitle("circle")
ERROR: UndefVarError: Uint8 not defined
in qtitle(::String) at ./REPL[41]:3
julia> # now press "[]" buttol in order to make a circle look like circle
# try to use left button ("ARROW") on a circle plot - it also works
# draw one more circle:
t1 = Array(linspace(0.,2. * pi, 8));
julia> x1 = 0.5*sin(t);
julia> y1 = 0.5*cos(t)
10000-element Array{Float64,1}:
0.5
0.5
0.499999
0.499998
0.499996
0.499994
0.499991
0.499988
0.499984
0.49998
⋮
-0.421699
-0.42143
-0.42116
-0.420891
-0.420621
-0.42035
-0.420079
-0.419808
-0.419536
julia> qplot2p(x1, y1, "circle #1", " ec", 20, t1)
ERROR: UndefVarError: Uint8 not defined
in qplot2p(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Array{Float64,1}) at ./REPL[38]:7
julia> # show "main window":
qsmw()
julia> # now lets try to draw a map
mwn = 4 # for example, we have only 4 points
4
julia> north = [55.688713, 55.698713, 55.678713, 55.60] # coords in degrees
4-element Array{Float64,1}:
55.6887
55.6987
55.6787
55.6
julia> east = [37.901073, 37.911073, 37.905073, 37.9] # coords in degrees
4-element Array{Float64,1}:
37.9011
37.9111
37.9051
37.9
julia> t4 = Array(linspace(0.,tMax, 4)); # create corresponding time info
(for magic markers)
julia> qfmap(5)
julia> qplot2p(east, north, "trajectory #1", "-rb", 20, t4);
ERROR: UndefVarError: Uint8 not defined
in qplot2p(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Array{Float64,1}) at ./REPL[38]:7
julia> qtitle("top view test");
ERROR: UndefVarError: Uint8 not defined
in qtitle(::String) at ./REPL[41]:3
julia> #another map:
north1 = [65.688713, 65.698713, 65.678713, 65.60] # coords in degrees
4-element Array{Float64,1}:
65.6887
65.6987
65.6787
65.6
julia> east1 = [27.901073, 28.111073, 28.005073, 27.9] # coords in degrees
4-element Array{Float64,1}:
27.9011
28.1111
28.0051
27.9
julia> qfmap(6)
julia> qplot2(east1, north1, "trajectory #2", "-rb", 2, t4);
ERROR: UndefVarError: Uint8 not defined
in qplot2(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Array{Float64,1}) at ./REPL[37]:7
julia> qplot2(east1, north1, "points", " er", 20, t4);
ERROR: UndefVarError: Uint8 not defined
in qplot2(::Array{Float64,1}, ::Array{Float64,1}, ::String, ::String,
::Int64, ::Array{Float64,1}) at ./REPL[37]:7
julia> qtitle("top view test #2");
ERROR: UndefVarError: Uint8 not defined
in qtitle(::String) at ./REPL[41]:3
julia>
Le jeudi 25 août 2016 12:01:30 UTC+2, Igor a écrit :
>
> Hello!
> I made another 2D plotting library for Julia. Please try to test it if you
> have some free time. Current version works only for Windows7 x64, but I'm
> planning to make everything work for Fedora Linux also.
>
> It is located here: https://github.com/ig-or/qwtwplot
> you'll have to read its description before the installation.
>
> It is based on underlying "C" library, which I used to use for data
> analysis for many years, but now I tried to make a Julia package out of it.
> I'm new to github, so your comments will be very appreciated.
>
> Best regards, Igor
>
>
>
>
>
>
>
>