Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In short: vline/hline versus xline/yline are very similar, but xline/yline is more full featured. I think we should make these changes to free-speech to "set a good example."
General info about the difference between vline/hline versus xline/yline is below. I intend to share this with lab members later.
ABOUT HLINE AND VLINE
hline and vline are free-speech functions for drawing horizontal and vertical lines. They're simple, and our code uses them a ton. A common call looks like this: hline(0, 'k', '--') , meaning, make a black horizontal line at zero with the '--' line style.
Two limitations with these functions are:
AN ALTERNATIVE FOR MOST SITUATIONS - YLINE AND XLINE
MATLAB has built-in functions yline and xline which behave similarly -- they draw a horizontal or vertical line at a specified value. E.g., yline(0, 'Color', 'k', 'LineStyle', '--') . However, yline and xline use a special object class called LineConstant which extends infinitely and has some different characteristics.
Benefits/differences when using yline and xline: