|
From: ChaoYue <cha...@gm...> - 2013-04-08 20:55:43
|
Hi Kevin, I don't check the link you provided very carefully. So I guess you already find a solution. otherwise I have done something similar before and have made a bit general function to do the job, which I think might be helpful for you. You can check the following three functions at https://github.com/ChaoYue/pylsce/blob/master/g.py Calc_Newaxes_Fraction Axes_Replace_Split_Axes Axes_Set_Breakaxis a working example is below: >>> fig,axs = plt.subplots(nrows=2) >>> bottom_ax, top_ax = g.Axes_Replace_Split_Axes(fig,axs[0],split_fraction=[0.36,0.04,0.6],direction='v') >>> g.Axes_Set_Breakaxis(bottom_ax, top_ax, 0.01,0.03,'v') >>> left_ax, right_ax = g.Axes_Replace_Split_Axes(fig,axs[1],split_fraction=[0.38,0.02,0.6],direction='h') >>> g.Axes_Set_Breakaxis(left_ax, right_ax, 0.03,0.02,'h') the figure is as attached. cheers, chao On Mon, Apr 8, 2013 at 9:05 PM, Kevin Hunter [via matplotlib] < ml-...@n5...> wrote: > At 4:20pm -0400 Sun, 07 Apr 2013, Francesco Montesano wrote: > > Il giorno 07/apr/2013 21:03, Kevin Hunter Kesling ha scritto: > >> On the other hand, I'm still such a noob at Matplotlib ... is there > >> a way to have one of the subplots take up more than its default 50% > >> allotment? > > > > you can give a look at the last two plots in this example > > http://matplotlib.org/examples/pylab_examples/demo_tight_layout.html or > use > > plot.axes providing the rectangle that you want > > That is closer to what I want, but still not there. I was finally able > to find something that fit the bill to 95% of what I want: > > > http://matplotlib.1069221.n5.nabble.com/Proposal-for-Broken-Axes-td38050.html > > The first post by 'klukas' does exactly what I asked for. It's a > zig-zag on the Y-axis to show that what is graphed is not continuous, > and unlike the various "official" examples, the zig-zag placement is > user-specifiable, as opposed to exactly halfway between the top and > bottom. > > The only thing I have yet to figure out how to do is to simultaneously > have a zig-zag on the X axis as well -- an artifact of how these > zig-zags must be created via multiple axes on the same figure, rather > than as built in to the axis artist. > > For googleability: > > The above linked graph code enables for matplotlib: > > - suppressed zeros on the Y-axis of an XY plot > - showing suppressed data on the Y-axis > - lightning bolt symbol on the Y-axis > - zig-zag on the Y-axis > - a "broken" Y-axis > > Thanks for your pointers, Francesco, as they helped me to fine-tune my > Google search terms. And thank you, Klukas, whoever you are. > > Cheers, > > Kevin > > ------------------------------------------------------------------------------ > > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > Matplotlib-users mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=40857&i=0> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://matplotlib.1069221.n5.nabble.com/zig-zag-to-represent-suppressed-0-on-axis-tp40849p40857.html > To start a new topic under matplotlib - users, email > ml-...@n5... > To unsubscribe from matplotlib, click here<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=Y2hhb3l1ZWpveUBnbWFpbC5jb218MnwxMzg1NzAzMzQx> > . > NAML<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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 ************************************************************************************ break_axis.jpg (182K) <http://matplotlib.1069221.n5.nabble.com/attachment/40858/0/break_axis.jpg> -- View this message in context: http://matplotlib.1069221.n5.nabble.com/zig-zag-to-represent-suppressed-0-on-axis-tp40849p40858.html Sent from the matplotlib - users mailing list archive at Nabble.com. |