Matplotlib quiver

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Matplotlib quiver

Raju Ankleshwaria

Dear Matplotlib help,

I have successfully created plots with quiver. The script is working. However, I want to create multiple plots (quiver) with different datasets. Due to the differences in datasets the length of the quiver is changing in each plot. How can I keep the quiver length same in each plots? Note, I do want variations in quiver length in the plot. I don't want the length of each quiver equal in same plot.

I am using below in my script.
Q=ax.quiver(x, y, u, v, pivot-'tip')
qk = ax.quiverkey(Q, 0.78, 0.78, 5, '5 mph', labelpos='E', coordinates=figure')

  1. scale function will not work.
  2. Normalizing the data will also not work

Please suggest/help.
RA


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Matplotlib quiver

Eric Firing
On 2017/08/24 6:21 AM, Raju Ankleshwaria wrote:

> Dear Matplotlib help,
>
> I have successfully created plots with quiver. The script is working.
> However, I want to create multiple plots (quiver) with different
> datasets. Due to the differences in datasets the length of the quiver is
> changing in each plot. How can I keep the quiver length same in each
> plots? Note, I do want variations in quiver length in the plot. I don't
> want the length of each quiver equal in same plot.
>
> I am using below in my script.
> Q=ax.quiver(x, y, u, v, pivot-'tip')
> qk = ax.quiverkey(Q, 0.78, 0.78, 5, '5 mph', labelpos='E',
> coordinates=figure')
>
>  1. scale function will not work.

Why do you say this?  If I understand your question correctly, setting
the scale and scale_units keyword arguments to the same value in each
plot should do what you need.

e.g.

Q=ax.quiver(x, y, u, v, pivot-'tip', scale=10, scale_units='inches')

Eric

>  2. Normalizing the data will also not work
>
> Please suggest/help.
> RA
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/matplotlib-users
>

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Matplotlib quiver

Raju Ankleshwaria
Bingo, it worked. I was using scale alone so it was not working. But worked with scale_units.

Thank you Eric.

On Thu, Aug 24, 2017 at 9:54 AM Eric Firing <[hidden email]> wrote:
On 2017/08/24 6:21 AM, Raju Ankleshwaria wrote:
> Dear Matplotlib help,
>
> I have successfully created plots with quiver. The script is working.
> However, I want to create multiple plots (quiver) with different
> datasets. Due to the differences in datasets the length of the quiver is
> changing in each plot. How can I keep the quiver length same in each
> plots? Note, I do want variations in quiver length in the plot. I don't
> want the length of each quiver equal in same plot.
>
> I am using below in my script.
> Q=ax.quiver(x, y, u, v, pivot-'tip')
> qk = ax.quiverkey(Q, 0.78, 0.78, 5, '5 mph', labelpos='E',
> coordinates=figure')
>
>  1. scale function will not work.

Why do you say this?  If I understand your question correctly, setting
the scale and scale_units keyword arguments to the same value in each
plot should do what you need.

e.g.

Q=ax.quiver(x, y, u, v, pivot-'tip', scale=10, scale_units='inches')

Eric

>  2. Normalizing the data will also not work
>
> Please suggest/help.
> RA
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/matplotlib-users
>

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users