X Tutup
Skip to content

support vertical quiverkey#4516

Closed
ocehugo wants to merge 3 commits intomatplotlib:masterfrom
ocehugo:master
Closed

support vertical quiverkey#4516
ocehugo wants to merge 3 commits intomatplotlib:masterfrom
ocehugo:master

Conversation

@ocehugo
Copy link
Copy Markdown

@ocehugo ocehugo commented Jun 12, 2015

add support to a vertical aligned (y wise) quiverkey.

The label for N and S are still over the arrow, but for label=W (my case) this snippet works.

Useful for a x-z plane quiver plot when the quiver arrows components have different units and user need to provide information about this in the plot. The currently default behaviour is to only plot a horizontal (x) quiverkey, while the vertical is assumed to be the same.

This also support the user to select if he wants to make a key that is horizontal or vertical aligned. Say that the flow is along y and the quiverkey is horizontal, the reader always need to rotate in his mind the vector to have a grasp about the magnitude.

ocehugo added 2 commits June 11, 2015 16:53
support a y aligned quiverkey. The label still need some work, since label=N | label=S still put the label over the arrow, but for label=W this works. 

Now it's possible to plot two quiverkeys that represents different motion scales  (say in a x-z plane).
Add support to vertical align quiverkeys
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a np. for this array.

Sorry guys, i did this in a hurry and from memory of what i did in a local install without proper tools, so the code was not debugged.
@WeatherGod
Copy link
Copy Markdown
Member

needs a unit test.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

rotation='vertical' if self._vswap else 'horizontal',

@tacaswell tacaswell added this to the proposed next point release milestone Jun 12, 2015
@ocehugo
Copy link
Copy Markdown
Author

ocehugo commented Jul 8, 2015

Hello again, sorry to let this sit for a while, was forgotten in the middle of everything hehe (I read the notification some day and forgot to return). @tacaswell , just a quick check before working again, do u want to send all pop items that are inside that func into the arguments!?

@tacaswell
Copy link
Copy Markdown
Member

I do, but looking at this again, that is out of scope for this PR (I thought there was only one or two). Ignore that comment and leave the pop you added to stay consistent with the code around it.

@ocehugo
Copy link
Copy Markdown
Author

ocehugo commented Jul 8, 2015

OK. So just change the rotation snippet or leave as is ? ( the dictionary with booleans was also used for consistency with the code).

@WeatherGod
Copy link
Copy Markdown
Member

Still needs a test, and still need to utilize the ternery condition instead of the dictionary approach for vswap.

@dstansby
Copy link
Copy Markdown
Member

The ability to rotate the quiverkey to an arbitrary angle was added in #7719, which makes this PR redundant. Thanks for opening it thought @ocehugo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup