Exemple #1
0
        except Exception:
            print('Failed to plot "{}"'.format(basename))
            plt.close()
        else:
            ax.set_xlim(args.xlim)
            ax.set_ylim(args.ylim)
            ax.set_xlabel(u'Posição (µm)')
            ax.set_ylabel(r'$\mu_C$ (kJ/mol)')
            ax.legend(loc=dictloc[args.loc], fancybox=False)

            if args.tracking:
                cprofiles.plot_locus_interface(
                    [('aus1.s0', 'aus1.ci0'), ('aus1.sn', 'aus1.cin'),
                     ('aus2.s0', 'aus2.ci0'), ('aus2.sn', 'aus2.cin')],
                    ax=ax,
                    mirror=args.mirror,
                    func=lambda x: 1e-3 * aust.x2mu['C'](x),
                    color='k',
                    ls=':',
                    lw=.8,
                    label='')

            if args.label:
                if last_t is not None:
                    cprofiles.label_phases(ax=ax,
                                           t=last_t,
                                           labels=labels,
                                           mirror=args.mirror,
                                           size=12)

            if args.save:
                fname = os.path.join(
        except Exception:
            print('Failed to plot "{}"'.format(basename))
            plt.close()
        else:
            ax.set_xlim(*args.xlim)
            ax.set_ylim(*args.ylim)
            ax.set_xlabel(u'Posição (μm)')
            ax.set_ylabel('Teor de carbono (%)')
            ax.legend(loc=dictloc[args.loc], fancybox=False)

            if args.tracking:
                cprofiles.plot_locus_interface(tracked_interfaces,
                                               ax=ax,
                                               mirror=args.mirror,
                                               color='k',
                                               ls='--',
                                               lw=.8,
                                               func=lambda x: x2wp(x, y=y),
                                               label='')

            if args.label:
                cprofiles.label_phases(ax=ax,
                                       t=args.time[0],
                                       labels=labels,
                                       mirror=args.mirror,
                                       size=12)

            if args.save:
                fname = os.path.join(
                    args.dir, cprofiles.basename + args.append + args.ext)
                plt.savefig(fname, bbox_inches='tight')