# updating subplot position with a "position string"

Hi everybody,

I would like to update a subplot position automatically. Try this example:

···

##################
from pylab import *
f = figure()
s1.plot( [5,7], [6,9], 'r' )
s2.plot( [5,7], [4,9], 'b' )
show()
##################

The problem is that the first subplot does not update its position when I add a second subplot with "position string" '212'. I would like the first subplot to take the position corresponding to a "position string" '211'.

I have not found any means to do this. The figure has some methods "subplots_adjust" and "subplotpars", but it seems that I am compelled to set the precise coordinates of the subplots, and so cannot do the positioning automatically with a "position string". Am I right? What is the best way to deal with this kind of problem?

Thanks a lot

Julien

You can change the position of the subplot using "change_geometry"
method, although it does not accept a sting argument.

-JJ

···

On Sat, Apr 11, 2009 at 4:59 PM, TP <paratribulations@...185...> wrote:

Hi everybody,

I would like to update a subplot position automatically. Try this example:

##################
from pylab import *
f = figure()
s1.plot( [5,7], [6,9], 'r' )
s2.plot( [5,7], [4,9], 'b' )
show()
##################

The problem is that the first subplot does not update its position when
I add a second subplot with "position string" '212'. I would like the
first subplot to take the position corresponding to a "position string"
'211'.

I have not found any means to do this. The figure has some methods
"subplots_adjust" and "subplotpars", but it seems that I am compelled to
set the precise coordinates of the subplots, and so cannot do the
positioning automatically with a "position string". Am I right? What is
the best way to deal with this kind of problem?

Thanks a lot

Julien

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8253933,"math_prob":0.57254183,"size":851,"snap":"2019-51-2020-05","text_gpt3_token_len":216,"char_repetition_ratio":0.17119244,"word_repetition_ratio":0.0,"special_character_ratio":0.3278496,"punctuation_ratio":0.13939394,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95925105,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-09T07:21:43Z\",\"WARC-Record-ID\":\"<urn:uuid:7794b1be-1b6b-464d-b05c-73b411bd9c18>\",\"Content-Length\":\"14792\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b6fa18e4-ae07-46a5-97e7-d46faea77a40>\",\"WARC-Concurrent-To\":\"<urn:uuid:ec1b360d-997d-4c21-97b1-034358789ae2>\",\"WARC-IP-Address\":\"165.22.13.220\",\"WARC-Target-URI\":\"https://discourse.matplotlib.org/t/updating-subplot-position-with-a-position-string/11070\",\"WARC-Payload-Digest\":\"sha1:AN7X7XPN5EOSAZVZICDVQAV3GHQYQR6N\",\"WARC-Block-Digest\":\"sha1:526K7U2ZAM45DZXETSLMYEF7J5UEDWEE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575540518337.65_warc_CC-MAIN-20191209065626-20191209093626-00280.warc.gz\"}"}