|
From: JoanPau <jo...@gm...> - 2009-05-13 22:06:23
|
Hi I would like to know what are the default values for the arrow style parameters in plots with vectors, and where are this values set in the source code. Thanks! -- View this message in context: http://www.nabble.com/deafault-arrow-style-%28head-length%29-in-plots-with-vectors-tp23530877p23530877.html Sent from the Gnuplot - Dev mailing list archive at Nabble.com. |
|
From: Ethan M. <merritt@u.washington.edu> - 2009-05-14 00:11:05
|
On Wednesday 13 May 2009 15:06:18 JoanPau wrote:
>
> Hi
>
> I would like to know what are the default values for the arrow style
> parameters in plots with vectors, and where are this values set in the
> source code.
They are set by this routine in gadgets.c:
void
default_arrow_style(struct arrow_style_type *arrow)
{
static const struct lp_style_type tmp_lp_style = DEFAULT_LP_STYLE_TYPE;
arrow->layer = 0;
arrow->lp_properties = tmp_lp_style;
arrow->head = 1;
arrow->head_length = 0.0;
arrow->head_lengthunit = first_axes;
arrow->head_angle = 15.0;
arrow->head_backangle = 90.0;
arrow->head_filled = 0;
}
--
Ethan A Merritt
|
|
From: JoanPau <jo...@gm...> - 2009-05-14 09:18:56
|
Ethan Merritt wrote:
>
>
> They are set by this routine in gadgets.c:
>
> void
> default_arrow_style(struct arrow_style_type *arrow)
> {
> static const struct lp_style_type tmp_lp_style =
> DEFAULT_LP_STYLE_TYPE;
>
> arrow->layer = 0;
> arrow->lp_properties = tmp_lp_style;
> arrow->head = 1;
> arrow->head_length = 0.0;
> arrow->head_lengthunit = first_axes;
> arrow->head_angle = 15.0;
> arrow->head_backangle = 90.0;
> arrow->head_filled = 0;
> }
>
>
Thanks for the quick reply.
I can understand all the options but one. What does a 0.0 head_length mean?
I thought that this would imply the same as nohead (any arrow drawn), but
obviously I was wrong.
Maybe it should be mentioned in the arrowstyle doc entry.
--
View this message in context: http://www.nabble.com/deafault-arrow-style-%28head-length%29-in-plots-with-vectors-tp23530877p23537035.html
Sent from the Gnuplot - Dev mailing list archive at Nabble.com.
|
|
From: JoanPau <jo...@gm...> - 2009-05-14 22:20:36
|
JoanPau wrote:
>
>
> Ethan Merritt wrote:
>>
>>
>> They are set by this routine in gadgets.c:
>>
>> void
>> default_arrow_style(struct arrow_style_type *arrow)
>> {
>> static const struct lp_style_type tmp_lp_style =
>> DEFAULT_LP_STYLE_TYPE;
>>
>> arrow->layer = 0;
>> arrow->lp_properties = tmp_lp_style;
>> arrow->head = 1;
>> arrow->head_length = 0.0;
>> arrow->head_lengthunit = first_axes;
>> arrow->head_angle = 15.0;
>> arrow->head_backangle = 90.0;
>> arrow->head_filled = 0;
>> }
>>
>>
>
> I can understand all the options but one. What does a 0.0 head_length
> mean?
> I thought that this would imply the same as nohead (any arrow drawn), but
> obviously I was wrong.
> Maybe it should be mentioned in the arrowstyle doc entry.
>
This example with only one vecotr may illustrate the (not self explanatory)
behavior of a zero head length. The data.gnuplot has only one line of text
with the coordinates of the vector:
File data.gnuplot wrote:
>
> 0.0 0.0 1.0 1.0
>
And these are the commands (the range commands only to better visualize the
vector in the plot)
set xrange [-2:2]
set yrange [-2:2]
plot './data.gnuplot' w vectors
plot './data.gnuplot' w vectors size 0,45
plot './data.gnuplot' w vectors size 0.5,45
As you can see, head is drawn with a non 0 length in the first and second
case, and in the second the angle is ignored. In addition, and correct me
if I misunderstand something, the head braces are not drawn in first_axes (x
axis) units, since they do not change their length when the plot is resized
or zoomed (for example interacting with the plot window).
--
View this message in context: http://www.nabble.com/deafault-arrow-style-%28head-length%29-in-plots-with-vectors-tp23530877p23550072.html
Sent from the Gnuplot - Dev mailing list archive at Nabble.com.
|
|
From: JoanPau <jo...@gm...> - 2009-05-14 22:22:37
|
JoanPau wrote:
>
>
> Ethan Merritt wrote:
>>
>>
>> They are set by this routine in gadgets.c:
>>
>> void
>> default_arrow_style(struct arrow_style_type *arrow)
>> {
>> static const struct lp_style_type tmp_lp_style =
>> DEFAULT_LP_STYLE_TYPE;
>>
>> arrow->layer = 0;
>> arrow->lp_properties = tmp_lp_style;
>> arrow->head = 1;
>> arrow->head_length = 0.0;
>> arrow->head_lengthunit = first_axes;
>> arrow->head_angle = 15.0;
>> arrow->head_backangle = 90.0;
>> arrow->head_filled = 0;
>> }
>>
>>
>
> I can understand all the options but one. What does a 0.0 head_length
> mean?
> I thought that this would imply the same as nohead (any arrow drawn), but
> obviously I was wrong.
> Maybe it should be mentioned in the arrowstyle doc entry.
>
This example with only one vecotr may illustrate the (not self explanatory)
behavior of a zero head length. The data.gnuplot has only one line of text
with the coordinates of the vector:
0.0 0.0 1.0 1.0
And these are the commands (the range commands only to better visualize the
vector in the plot)
set xrange [-2:2]
set yrange [-2:2]
plot './data.gnuplot' w vectors
plot './data.gnuplot' w vectors size 0,45
plot './data.gnuplot' w vectors size 0.5,45
As you can see, head is drawn with a non 0 length in the first and second
case, and in the second the angle is ignored. In addition, and correct me
if I misunderstand something, the head braces are not drawn in first_axes (x
axis) units, since they do not change their length when the plot is resized
or zoomed (for example interacting with the plot window).
--
View this message in context: http://www.nabble.com/deafault-arrow-style-%28head-length%29-in-plots-with-vectors-tp23530877p23550090.html
Sent from the Gnuplot - Dev mailing list archive at Nabble.com.
|