5
$\begingroup$

The following code displays differently with v9 & v10:

VectorPlot[{1, 2 x (1 - x)}, {t, 0, 1}, {x, 0, 1}, 
VectorScale -> {.03, Automatic, None}, 
VectorStyle -> {Red, "Segment"}]

In v9 the arrowheads are not present. This is the image I want. No arrowheads here

In v10, arrowheads are present and I do not want them. with arrowheads

I have tried using VectorStyle->{Red,Arrowheads[0]} in v10 but to no avail.

$\endgroup$

2 Answers 2

7
$\begingroup$

In my opinion VectorStyle -> {Red, "Segment"} should not work in the way you illustrate as it should be interpreted as styling for two different vector fields and in version 10 it is. Directive should work but apparently it does not.

What does work in version 10 is a List of directives one level down, e.g.:

VectorStyle -> {{dir1, dir2, ...}, ...}

For your example:

VectorPlot[{1, 2 x (1 - x)}, {t, 0, 1}, {x, 0, 1},
 VectorScale -> {.03, Automatic, None}, 
 VectorStyle -> {{Red, "Segment"}}]

enter image description here


Related: Can I change the font of all elements in my barchart with one property?

$\endgroup$
0
2
$\begingroup$

Here's a workaround:

VectorPlot[{1, 2 x (1 - x)}, {t, 0, 1}, {x, 0, 1},
 VectorScale -> {.03, Automatic, None},
 VectorStyle -> Arrowheads[0],
 VectorColorFunction -> {Hue[#*0] &}]

enter image description here

The whole thing seems to be buggy in V10

$\endgroup$
1
  • $\begingroup$ This works alright. (Note that your parens in the last line need to be curly braces.) "Segment" also works in place of Arrowheads[0]. $\endgroup$
    – Stephen
    Aug 30, 2014 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.