How can I record the X,Y limits of a displayed X,Y plot using the matplotlib show() module?

+2 votes
I have routine that makes X,Y plots and I use show() to reformat the plot and use an interactive cursor. However, I am unable to access information after using show() about, for example, the X and Y limits I used in my final version. There are a lot of things I would like to understand about show(). Is there a good source of general information on how to use show()?
Dec 25, 2018 in Python by anonymous
Are you running the script on ipython with pylab mode or in non-interactive mode?*args**kw)

The show module when running in ipython with its pylab mode, display all figures and return to the ipython prompt.

When you are using a non-interactive mode it will display all figures and block until the figures have been closed.

When you are using it in an interactive mode it will have no effect unless figures were created prior to a change from non-interactive to interactive mode.

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
A couple hours after posting this question I found some info on interactive mode. I never appreciated that show() is of noninteractive mode (ipoff). I used plt.ipon to turn interactibve mode on and found that this performance is what I was after. I can record X,Y positions and keystroke values and pass them back. Todays project: how to query and adjust the values in the rcParams dictionary to learn (for instance) the X,Y virtaul limints for the axes used in the last viewing. Thanks for you interest.
answered Dec 27, 2018 by anonymous

Hey @anonymus, to change the default rc settings in python script, you need to know that all the rc values are stored in dictionary-like variables known as matplotlib.rcParams. This is the global package it can be modified like this:

mpl.rcParams['lines.linewidth'] = length
mpl.rcParams['lines.color'] = 'color' 

Hope this helps.

Have you tried some script to do this?

Related Questions In Python

+2 votes
2 answers

How can I plot a k-dsitance graph using python?

Hi there, instead of sklearn you could ...READ MORE

answered Apr 10, 2018 in Python by charlie_brown
• 7,710 points
+2 votes
2 answers

In a list of dictionaries, how can I find the minimum calue in a common dictionary field.

There are several options. Here is a ...READ MORE

answered Apr 10, 2018 in Python by charlie_brown
• 7,710 points
0 votes
1 answer

How can I get the count of a list in Python?

len() >>> mylist=[] >>> print len(mylist) 0 READ MORE

answered Dec 12, 2018 in Python by charlie_brown
• 7,710 points
0 votes
1 answer

How can I lookup hostname using the IP address with a timeout in Python?

Good question. I actually was stuck with ...READ MORE

answered Feb 6 in Python by Nymeria
• 3,500 points
0 votes
1 answer
0 votes
1 answer

How can I find the square of a number in python?

You can use the exponentiation operator or ...READ MORE

answered 4 days ago in Python by Mohammad
• 1,400 points
+2 votes
2 answers

How can I replace values with 'none' in a dataframe using pandas

Actually in later versions of pandas this ...READ MORE

answered Aug 13, 2018 in Python by bug_seeker
• 14,970 points
+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,710 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.