Re: [Matplotlib-users] Is it possible to truncate axes in matplotlib?
Is this what you want? I change a bit of the code and put some example data there. fig,axs = plt.subplots(nrows=2, ncols = 2, figsize = (6, 6) ) plt.subplots_adjust( left = 0.0505, right = 0.96, bottom = 0.05, top = 0.95 , wspace = 0.07, hspace = 0.12) left_ax, right_ax = Axes_Replace_Split_Axes(fig,axs[1,1],split_fraction=[0.48,0.02,0.50],direction='h') Axes_Set_Breakaxis(left_ax, right_ax, 0.03,0.02,'h') #left_ax.set_xlim(-0.05, 0.29) #left_ax.set_xticks (np.arange (0, 0.3, 0.1)) #right_ax.set_xticks (np.arange (0.7, 1.05, 0.1)) #right_ax.set_xlim(0.71, 1) left_ax.plot(np.arange(10),'ro') right_ax.plot(np.arange(10),'ro') left_ax.set_xlim(0,10) right_ax.set_xlim(0,10) left_ax.set_ylim(0,15) right_ax.set_ylim(0,40) cheers, Chao On Sat, May 25, 2013 at 11:54 AM, mat [via matplotlib] ml-node+s1069221n4112...@n5.nabble.com wrote: Great! The code is almost finished: fig,axs = plt.subplots(nrows=2, ncols = 2, figsize = (11, 10) ) plt.subplots_adjust( left = 0.0505, right = 0.96, bottom = 0.05, top = 0.95 , wspace = 0.07, hspace = 0.12) left_ax, right_ax = Axes_Replace_Split_Axes(fig,axs[1,1],split_fraction=[0.48,0.02,0.50],direction='h') Axes_Set_Breakaxis(left_ax, right_ax, 0.03,0.02,'h') left_ax.set_xlim(-0.05, 0.29) left_ax.set_xticks (np.arange (0, 0.3, 0.1)) right_ax.set_xticks (np.arange (0.7, 1.05, 0.1)) right_ax.set_xlim(0.71, 1) All what I need now is to manipulate the ylim of the truncated subplot (independently for the left and right y axes). plt.ylim(300, 500) only modifies the right yaxis of the truncated plot, not the left one. Is it possible to modify the left y axis of the truncated plot? 2013/5/24 ChaoYue [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41129i=0 Hi Mat, so you have two points in the TODO: #TODO: #plot something on the left side of suplot 2 -- plt.plot(xx,yy, marker = 'o', color = 'k') does not work #change the y axis of suplot 2, on the right and on the left side the first one, is this what you want? left_ax.plot(xx,yy, marker = 'o', color = 'k') the second one, I don't get well, are you meaning something like: left_ax.set_ylim()? cheers, Chao On Fri, May 24, 2013 at 2:36 PM, mat [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41124i=0 wrote: Hi Chao, Please find attached the script which includes your 3 functions, and a plot that I've just made. The things I can't manage to do are listed in the TODO section (end of the script) Cheers, Mat 2013/5/24 ChaoYue [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41123i=0 Hi, could you send an attachment to show what you've achieved so far? Chao -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41122.html To unsubscribe from Is it possible to truncate axes in matplotlib?, click here. NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml *truncated_plot.py* (11K) Download Attachmenthttp://matplotlib.1069221.n5.nabble.com/attachment/41123/0/truncated_plot.py -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41123.html To start a new topic under matplotlib - users, email [hidden email]http://user/SendEmail.jtp?type=nodenode=41124i=1 To unsubscribe from matplotlib, click here. NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41124.html To unsubscribe from Is it possible to truncate axes in
Re: [Matplotlib-users] Is it possible to truncate axes in matplotlib?
Hi Mat, Just one words, the plt. functions probably normally pick the last active axes to act on. many of these functions are methods of axes object, you can call directly from there. Chao On Sat, May 25, 2013 at 1:14 PM, mat [via matplotlib] ml-node+s1069221n41131...@n5.nabble.com wrote: Perfect!! Many thanks! 2013/5/25 ChaoYue [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41131i=0 Is this what you want? I change a bit of the code and put some example data there. fig,axs = plt.subplots(nrows=2, ncols = 2, figsize = (6, 6) ) plt.subplots_adjust( left = 0.0505, right = 0.96, bottom = 0.05, top = 0.95 , wspace = 0.07, hspace = 0.12) left_ax, right_ax = Axes_Replace_Split_Axes(fig,axs[1,1],split_fraction=[0.48,0.02,0.50],direction='h') Axes_Set_Breakaxis(left_ax, right_ax, 0.03,0.02,'h') #left_ax.set_xlim(-0.05, 0.29) #left_ax.set_xticks (np.arange (0, 0.3, 0.1)) #right_ax.set_xticks (np.arange (0.7, 1.05, 0.1)) #right_ax.set_xlim(0.71, 1) left_ax.plot(np.arange(10),'ro') right_ax.plot(np.arange(10),'ro') left_ax.set_xlim(0,10) right_ax.set_xlim(0,10) left_ax.set_ylim(0,15) right_ax.set_ylim(0,40) cheers, Chao On Sat, May 25, 2013 at 11:54 AM, mat [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41130i=0 wrote: Great! The code is almost finished: fig,axs = plt.subplots(nrows=2, ncols = 2, figsize = (11, 10) ) plt.subplots_adjust( left = 0.0505, right = 0.96, bottom = 0.05, top = 0.95 , wspace = 0.07, hspace = 0.12) left_ax, right_ax = Axes_Replace_Split_Axes(fig,axs[1,1],split_fraction=[0.48,0.02,0.50],direction='h') Axes_Set_Breakaxis(left_ax, right_ax, 0.03,0.02,'h') left_ax.set_xlim(-0.05, 0.29) left_ax.set_xticks (np.arange (0, 0.3, 0.1)) right_ax.set_xticks (np.arange (0.7, 1.05, 0.1)) right_ax.set_xlim(0.71, 1) All what I need now is to manipulate the ylim of the truncated subplot (independently for the left and right y axes). plt.ylim(300, 500) only modifies the right yaxis of the truncated plot, not the left one. Is it possible to modify the left y axis of the truncated plot? 2013/5/24 ChaoYue [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41129i=0 Hi Mat, so you have two points in the TODO: #TODO: #plot something on the left side of suplot 2 -- plt.plot(xx,yy, marker = 'o', color = 'k') does not work #change the y axis of suplot 2, on the right and on the left side the first one, is this what you want? left_ax.plot(xx,yy, marker = 'o', color = 'k') the second one, I don't get well, are you meaning something like: left_ax.set_ylim()? cheers, Chao On Fri, May 24, 2013 at 2:36 PM, mat [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41124i=0 wrote: Hi Chao, Please find attached the script which includes your 3 functions, and a plot that I've just made. The things I can't manage to do are listed in the TODO section (end of the script) Cheers, Mat 2013/5/24 ChaoYue [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41123i=0 Hi, could you send an attachment to show what you've achieved so far? Chao -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41122.html To unsubscribe from Is it possible to truncate axes in matplotlib?, click here. NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml *truncated_plot.py* (11K) Download Attachmenthttp://matplotlib.1069221.n5.nabble.com/attachment/41123/0/truncated_plot.py -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41123.html To start a new topic under matplotlib - users, email [hidden email]http://user/SendEmail.jtp?type=nodenode=41124i=1 To unsubscribe from matplotlib, click here. NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572
Re: [Matplotlib-users] Is it possible to truncate axes in matplotlib?
Hi, could you send an attachment to show what you've achieved so far? Chao -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41122.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Is it possible to truncate axes in matplotlib?
Hi Mat, so you have two points in the TODO: #TODO: #plot something on the left side of suplot 2 -- plt.plot(xx,yy, marker = 'o', color = 'k') does not work #change the y axis of suplot 2, on the right and on the left side the first one, is this what you want? left_ax.plot(xx,yy, marker = 'o', color = 'k') the second one, I don't get well, are you meaning something like: left_ax.set_ylim()? cheers, Chao On Fri, May 24, 2013 at 2:36 PM, mat [via matplotlib] ml-node+s1069221n41123...@n5.nabble.com wrote: Hi Chao, Please find attached the script which includes your 3 functions, and a plot that I've just made. The things I can't manage to do are listed in the TODO section (end of the script) Cheers, Mat 2013/5/24 ChaoYue [via matplotlib] [hidden email]http://user/SendEmail.jtp?type=nodenode=41123i=0 Hi, could you send an attachment to show what you've achieved so far? Chao -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41122.html To unsubscribe from Is it possible to truncate axes in matplotlib?, click here. NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml *truncated_plot.py* (11K) Download Attachmenthttp://matplotlib.1069221.n5.nabble.com/attachment/41123/0/truncated_plot.py -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41123.html To start a new topic under matplotlib - users, email ml-node+s1069221n...@n5.nabble.com To unsubscribe from matplotlib, click herehttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=2code=Y2hhb3l1ZWpveUBnbWFpbC5jb218MnwxMzg1NzAzMzQx . NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41124.html Sent from the matplotlib - users mailing list archive at Nabble.com.-- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Is it possible to truncate axes in matplotlib?
Hi Mat, this has been asked before. see here: http://matplotlib.1069221.n5.nabble.com/quot-zig-zag-quot-to-represent-suppressed-0-on-axis-td40849.html#a40858 cheers, Chao On Mon, May 20, 2013 at 8:29 PM, mat [via matplotlib] ml-node+s1069221n41092...@n5.nabble.com wrote: Dear community, I would like to truncate the x axis of a plot, as in the attached figure: Is it possible to do so ? Best, Mat -- If you reply to this email, your message will be added to the discussion below: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092.html To start a new topic under matplotlib - users, email ml-node+s1069221n...@n5.nabble.com To unsubscribe from matplotlib, click herehttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=2code=Y2hhb3l1ZWpveUBnbWFpbC5jb218MnwxMzg1NzAzMzQx . NAMLhttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41103.html Sent from the matplotlib - users mailing list archive at Nabble.com.-- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users