-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial save and restore functionality
- Loading branch information
1 parent
f6773a7
commit 27f16aa
Showing
3 changed files
with
273 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
""" | ||
PythonDBAGraphs: Graphs to help with Oracle Database Tuning | ||
Copyright (C) 2016 Robert Taft Durrett (Bobby Durrett) | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
Contact: | ||
[email protected] | ||
show_saved.py | ||
Restores saved data and displays graph. | ||
""" | ||
|
||
import myplot | ||
import util | ||
|
||
# Get full path to the .txt file that was saved when the graph was produced | ||
|
||
file_name = util.input_no_default('Enter name of data file to be restored: ') | ||
|
||
# Restore data into all of the myplot module global variables that are used | ||
# by the different graphs | ||
|
||
plot_name = myplot.restore_data(file_name) | ||
|
||
# Call the graphing routine that was used for this plot | ||
|
||
if plot_name == 'stacked_bar': | ||
myplot.stacked_bar() | ||
elif plot_name == 'line': | ||
myplot.line() | ||
elif plot_name == 'line_2subplots': | ||
myplot.line_2subplots() | ||
elif plot_name == 'line_4subplots': | ||
myplot.line_4subplots() | ||
else: | ||
print('Invalid plot_name = '+plot_name) |
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