Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
blaar
gnuplot
Commits
1b3fd663
Commit
1b3fd663
authored
Nov 19, 2018
by
Arnaud Blanchard
Browse files
Merge branch 'master' of
https://promethe.u-cergy.fr/blaar/gnuplot
parents
2d3dbf6c
9f401be1
Changes
3
Show whitespace changes
Inline
Side-by-side
o_gnuplot/src/graph.cpp
View file @
1b3fd663
...
...
@@ -67,6 +67,7 @@ void create_graph(blc_channel *input, char const *title, int refresh_period, flo
init_term
(
pipef
,
title
,
verbatim
);
if
(
min
!=
max
)
fprintf
(
pipef
,
"set yrange [%f:%f]
\n
"
,
min
,
max
);
if
(
columns_nb
==
1
)
xmin
=-
1
;
if
(
xmin
!=
xmax
)
fprintf
(
pipef
,
"set xrange [%f:%f]
\n
"
,
xmin
,
xmax
);
if
(
input
->
dims_nb
==
2
){
...
...
@@ -74,9 +75,6 @@ void create_graph(blc_channel *input, char const *title, int refresh_period, flo
fprintf
(
pipef
,
"set yrange [%f:%f]
\n
"
,
0.
f
,
10.
f
);
fprintf
(
pipef
,
"set zrange [%f:%f]
\n
"
,
min
,
max
);
fprintf
(
pipef
,
"set view 30,190
\n
"
);
offset
=
snprintf
(
command
,
LINE_MAX
,
"splot '-' binary format='%s' array=%dx%d title 'values' with pm3d "
,
gnuplot_format
,
columns_nb
,
rows_nb
);
}
else
{
...
...
@@ -92,8 +90,6 @@ void create_graph(blc_channel *input, char const *title, int refresh_period, flo
buffer
=
MANY_ALLOCATIONS
(
input
->
size
,
char
);
blc_loop_try_add_waiting_semaphore
(
input
->
sem_new_data
);
BLC_COMMAND_LOOP
(
refresh_period
){
memcpy
(
buffer
,
input
->
data
,
input
->
size
);
if
(
input
->
sem_ack_data
)
SYSTEM_ERROR_CHECK
(
sem_post
(
input
->
sem_ack_data
),
-
1
,
NULL
);
...
...
o_gnuplot/src/history_graph.cpp
View file @
1b3fd663
o_gnuplot/src/o_gnuplot.cpp
View file @
1b3fd663
...
...
@@ -46,28 +46,10 @@ int main(int argc, char *argv[]){
blc_program_add_option
(
&
refresh_string
,
'P'
,
"period"
,
"UI32"
,
"graph refresh period in ms"
,
"100"
);
blc_program_add_parameter
(
&
channel_name
,
"blc_channel"
,
1
,
"channel you want to graph"
,
NULL
);
// blc_program_add_option(&size_str, 's', "size", "UI32[xUI32]", "size of the matrix", NULL);
blc_program_init
(
&
argc
,
&
argv
,
blc_quit
);
blc_command_forward_blc_channels
();
/*
if (size_str){
dims_nb=blc_sscan_dims(&lengths, size_str);
switch(dims_nb){
case 1: final_columns_nb=lengths[0];
final_rows_nb=1;
break;
case 2:final_columns_nb=lengths[0];
final_rows_nb=lengths[1];
break;
default:EXIT_ON_ERROR("Size of dim %d is not yet managed in size '%s'.", dims_nb, size_str);
}
FREE(lengths);
}*/
input
.
open
(
channel_name
,
BLC_CHANNEL_READ
);
if
(
min_str
)
min
=
strtof
(
min_str
,
NULL
);
else
switch
(
input
.
type
){
case
'
UIN8
'
:
case
'
UI16
'
:
case
'
UI32
'
:
case
'
IN16
'
:
case
'
IN32
'
:
case
'
IN64
'
:
case
'
FL32
'
:
case
'
FL64
'
:
min
=
0.0
;
break
;
...
...
@@ -108,10 +90,3 @@ int main(int argc, char *argv[]){
return
(
status
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment