-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from hanjinliu/regplot
Add regplot
- Loading branch information
Showing
34 changed files
with
425 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
import numpy as np | ||
|
||
import whitecanvas.plot as plt | ||
|
||
from whitecanvas.backend import use_backend | ||
|
||
def test_functions(): | ||
arr = np.arange(10) | ||
plt.figure(size=(400, 300)) | ||
plt.line(arr) | ||
plt.markers(arr) | ||
plt.bars(arr, arr / 2) | ||
plt.band(arr, arr / 2, arr * 2) | ||
plt.errorbars(arr, arr / 2, arr * 2) | ||
plt.hist(arr) | ||
plt.spans([[4, 10], [5, 14]]) | ||
plt.infcurve(lambda x: x ** 2) | ||
plt.infline((0, 0), 40) | ||
plt.legend() | ||
plt.xlim() | ||
plt.xlim(0, 10) | ||
plt.ylim() | ||
plt.ylim(0, 10) | ||
plt.title("Title") | ||
plt.xlabel("X") | ||
plt.ylabel("Y") | ||
plt.xticks() | ||
plt.xticks([0, 3, 6, 9]) | ||
plt.xticks([0, 3, 6, 9], ["a", "b", "c", "d"]) | ||
plt.yticks() | ||
plt.yticks([0, 3, 6, 9]) | ||
plt.yticks([0, 3, 6, 9], ["a", "b", "c", "d"]) | ||
plt.show() | ||
with use_backend("mock"): | ||
plt.figure(size=(400, 300)) | ||
plt.line(arr) | ||
plt.markers(arr) | ||
plt.bars(arr, arr / 2) | ||
plt.band(arr, arr / 2, arr * 2) | ||
plt.errorbars(arr, arr / 2, arr * 2) | ||
plt.hist(arr) | ||
plt.spans([[4, 10], [5, 14]]) | ||
plt.infcurve(lambda x: x ** 2) | ||
plt.infline((0, 0), 40) | ||
plt.legend() | ||
plt.xlim() | ||
plt.xlim(0, 10) | ||
plt.ylim() | ||
plt.ylim(0, 10) | ||
plt.title("Title") | ||
plt.xlabel("X") | ||
plt.ylabel("Y") | ||
plt.xticks() | ||
plt.xticks([0, 3, 6, 9]) | ||
plt.xticks([0, 3, 6, 9], ["a", "b", "c", "d"]) | ||
plt.yticks() | ||
plt.yticks([0, 3, 6, 9]) | ||
plt.yticks([0, 3, 6, 9], ["a", "b", "c", "d"]) | ||
plt.show() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from whitecanvas.backend._instance import Backend, patch_dummy_backend | ||
from whitecanvas.backend._instance import Backend, patch_dummy_backend, use_backend | ||
|
||
__all__ = ["Backend", "patch_dummy_backend"] | ||
__all__ = ["Backend", "patch_dummy_backend", "use_backend"] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.