Mathematica Mathematica VectorFieldPlot axes

  • Thread starter Thread starter zeebo17
  • Start date Start date
  • Tags Tags
    Axes Mathematica
AI Thread Summary
The discussion centers on the limitations of the VectorFieldPlot function in version 6.0.0, particularly regarding the addition of axes and the behavior of axis limits. Users are experiencing confusion over how axis limits are interpreted, noting that entering limits in reverse order does not yield the expected results. Specifically, combinations of limits like {x, xmax, xmin} and {y, ymax, ymin} produce identical graphs, raising questions about the software's automatic handling of axis limits. A suggestion is made to test the behavior of VectorFieldPlot using an asymmetric function, such as {2x, y^3}, to observe if the software reorders plot ranges. Additionally, a workaround is proposed to add axes to the VectorFieldPlot by overlaying it with a Plot command using the Show function, although the effectiveness of this solution in version 6 remains unverified.
zeebo17
Messages
40
Reaction score
0
I have done some research and it seems like the option to add axes to VectorFieldPlot isn't available in my 6.0.0 version. (Unless someone knows how to do this?) Because of that, I'm having problems understanding how the axes limits command is working.

For the Plot command, even though it states that it should be entered {x, xmin, xmax} and {y, ymin, ymax}, it seems to automatically switch the xmin and xmax if they are entered backwards. Now, I am having trouble figuring out if VectorFieldPlot does something similar. When entered backwards {x, xmax, xmin} and {y, ymax, ymin} it doesn't seem to produce the expected "backwards" graph. What is even more confusing is that:
{x, xmax, xmin} and {y, ymax, ymin}
{x, xmax, xmin} and {y, ymin, ymax}
{x, xmin, xmax} and {y, ymax, ymin}
all produce the same graph.

Any one know whether or not it automatically plots the lowest limit on the left/bottom? Or how to explain the above behavior?

Thanks!
 
Physics news on Phys.org
I could imagine that the software determines automatically the appropriate limits. A possibility could be to integrate the axis into the object you want to plot, as part of the vector field.
 
Without a concrete example, I can't tell whether you are using asymmetric functions in your VectorFieldPlot or not. To determine whether VectorFieldPlot is reordering the plot ranges can you choose a function that is clearly asymmetric in both x and y and see by inspection whether it is doing this or not? Perhaps {2x,y^3} would be a field which should settle this.

To get axes added to VectorFieldPlot could you do something like this

Code:
Show[Plot[0,{x,1,3},PlotRange->{{1,3},{1,2}}],VectorFieldPlot[{2x,y^3},{x,1,3},{y,1,2}]]

which creates an empty plot with the appropriate range with axes and a vector field plot with the appropriate range without axes and then overlays those with Show.

Unfortunately I cannot test this under version 6 so I cannot verify whether this will work for you or not.

(Only after submitting this answer did I notice the original question was ten years old)
 
Last edited:

Similar threads

Replies
4
Views
2K
Replies
8
Views
2K
Replies
6
Views
2K
Replies
5
Views
1K
Replies
2
Views
1K
Replies
1
Views
7K
Replies
8
Views
1K
Back
Top