Title for matplotlib legend
Add the title parameter to the this line: legend = plt.legend(handles=[one, two, three], title=”title”, loc=4, fontsize=”small”, fancybox=True) See also the official docs for the legend constructor.
Add the title parameter to the this line: legend = plt.legend(handles=[one, two, three], title=”title”, loc=4, fontsize=”small”, fancybox=True) See also the official docs for the legend constructor.
Is this like in this git-add post? Manually editing the hunk is immensely powerful, but also a bit complicated if you’ve never done it before. The most important thing to keep in mind: The diff is always indented with one character in addition to whatever other indentation is there. The character can either be: a … Read more
The -u option you used specifies the unified format. In that format the first two lines is a header: — is the original file, +++ is the new file, and the timestamps. @@ block headers That is then followed by chunks (change hunks) that starts with the @@ -R,r +R,r @@ syntax. Those are two … Read more
If manually editing the patch file is out of the question or infeasible, this can be done with standard options (available in git apply, git format-patch and GNU patch). -p<n> removes n leading directories from the paths in the patch. After processing -p, –directory=<root> prepends root to each of the paths in the patch before … Read more
From Repository Explorer, Repository > Import…
A patch created with git format-patch will also include some meta-information about the commit (committer, date, commit message, …) and will contains diff of binary data. Everything will be formatted as a mail, so that it can be easily sent. The person that receive it can then recreate the corresponding commit with git am and … Read more
You don’t need to care. The warning enacts a standard of cleanliness of text files in regard to whitespace, the kind of thing that many programmers tend to care about. As the manual explains: What are considered whitespace errors is controlled by core.whitespace configuration. By default, trailing whitespaces (including lines that solely consist of whitespaces) … Read more
There are two ways you can do this; with patch and with patch.object Patch assumes that you are not directly importing the object but that it is being used by the object you are testing as in the following #foo.py def some_fn(): return ‘some_fn’ class Foo(object): def method_1(self): return some_fn() #bar.py import foo class Bar(object): … Read more
You could create the patch using git diff and then apply it using the patch utility, which allows you to specify the file you want to apply the diff to. For example: cd first-repo git diff HEAD^ — hello.test > ~/patch_file cd ../second-repo patch -p1 blue/red/hi.test ~/patch_file
Apply Patch With TortoiseMerge: Find and open an existing SVN repo directory Create a new directory named “merges”, if it does not exist already Copy the file onto which you want to apply the .patch file ADD and COMMIT to the svn repository before you continue to the next step Right click on merges and … Read more