I have 2 plot it's work using my data analysis. I have some options -x
, -y
, -e
— these work.
Now I am trying to add to arguments:
--first
--second
When we execute the file.py --first
, it should show the first plot and exit; if we choose --second
, the second plot and exit. I am trying to solve that but I could not find the solution.
def Plot_XvsY(x,y):
plot(x1,y1,'bx-',ms=5)
plot(x2,y2,'r+-',ms=3)
show()
def plot_wVSs(w,s):
plot(w,s,'bx-',ms=5)
plot(w,s,'r+-',ms=3)
show()
parser.add_argument('-c', '--first', action='store_true', default=False)
Note: it's just part of the code to give you an idea about the issue.
And what if i want to :
for exemple if i have x.py and y.py and arg_argument.py and when i put ./x.py -h or ./y.py -h they have the same argument , i want to use some argument in x ONLY and the others on Y ONLY and mybe some arguments in X AND Y