LearnPy Hub
← Matplotlib Charts problems
Medium

Switch an Axis to Log Scale

Read y values (all positive) and a scale for each axis (linear or log). Plot the values, set the scales with set_xscale and set_yscale, and print get_xscale() and get_yscale() on one line, then the number of lines plotted.

Input

Values, x scale, y scale.

Output

Two lines.

Sample 1

Input
1 10 100 1000
linear
log
Output
linear log
1

Sample 2

Input
5 6
log
log
Output
log log
1
solution.py
Output appears here
Switch an Axis to Log Scale · Python practice problem · LearnPy Hub