mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[python] matplotlib: add color argument to plot, scatter, hist, bar and
arrow
This commit is contained in:
@@ -35,6 +35,7 @@ QUIZ_CASE(python_matplotlib_pyplot_arrow) {
|
||||
TestExecutionEnvironment env = init_environement();
|
||||
assert_command_execution_succeeds(env, "from matplotlib.pyplot import *");
|
||||
assert_command_execution_succeeds(env, "arrow(2,3,4,5)");
|
||||
assert_command_execution_succeeds(env, "arrow(2,3,4,5, \"#FF00FF\")");
|
||||
assert_command_execution_succeeds(env, "show()");
|
||||
deinit_environment();
|
||||
}
|
||||
@@ -59,6 +60,7 @@ QUIZ_CASE(python_matplotlib_pyplot_bar) {
|
||||
assert_command_execution_succeeds(env, "bar([],[])");
|
||||
assert_command_execution_succeeds(env, "bar([1,2,3],[1,2,3],2,3)");
|
||||
assert_command_execution_succeeds(env, "bar([1,2,3],[1,2,3],[1,2,3],[1,2,3])");
|
||||
assert_command_execution_succeeds(env, "bar([1,2,3],[1,2,3],[1,2,3],[1,2,3], \"orange\")");
|
||||
assert_command_execution_succeeds(env, "show()");
|
||||
assert_command_execution_fails(env, "bar([1,2,3],[1,2,3,4],[1,2,3],[1,2,3])");
|
||||
deinit_environment();
|
||||
@@ -79,6 +81,7 @@ QUIZ_CASE(python_matplotlib_pyplot_hist) {
|
||||
assert_command_execution_succeeds(env, "hist([2,3,4,5,6],23)");
|
||||
assert_command_execution_succeeds(env, "hist([2,3,4,5,6],[0,2,3])");
|
||||
assert_command_execution_succeeds(env, "hist([2,3,4,5,6],[0,2,3, 4,5,6,7])");
|
||||
assert_command_execution_succeeds(env, "hist([2,3,4,5,6],[0,2,3, 4,5,6,7], (0,255,0))");
|
||||
assert_command_execution_succeeds(env, "show()");
|
||||
deinit_environment();
|
||||
}
|
||||
@@ -89,6 +92,7 @@ QUIZ_CASE(python_matplotlib_pyplot_plot) {
|
||||
assert_command_execution_succeeds(env, "plot([2,3,4,5,6])");
|
||||
assert_command_execution_succeeds(env, "plot(2,3)");
|
||||
assert_command_execution_succeeds(env, "plot([2,3,4,5,6],[3,4,5,6,7])");
|
||||
assert_command_execution_succeeds(env, "plot([2,3,4,5,6],[3,4,5,6,7], \"g\")");
|
||||
assert_command_execution_succeeds(env, "show()");
|
||||
assert_command_execution_fails(env, "plot([2,3,4,5,6],2)");
|
||||
deinit_environment();
|
||||
@@ -99,6 +103,7 @@ QUIZ_CASE(python_matplotlib_pyplot_scatter) {
|
||||
assert_command_execution_succeeds(env, "from matplotlib.pyplot import *");
|
||||
assert_command_execution_succeeds(env, "scatter(2,3)");
|
||||
assert_command_execution_succeeds(env, "scatter([2,3,4,5,6],[3,4,5,6,7])");
|
||||
assert_command_execution_succeeds(env, "scatter([2,3,4,5,6],[3,4,5,6,7], (0,0,255))");
|
||||
assert_command_execution_succeeds(env, "show()");
|
||||
assert_command_execution_fails(env, "scatter([2,3,4,5,6],2)");
|
||||
deinit_environment();
|
||||
|
||||
Reference in New Issue
Block a user