Python Forum

Full Version: Create PDF with text from PNGs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello. I need to make a PDF from four graphic plots, that are supposed to be displayed in  landscape orientation and in a 2x2 matrix (preferably, with controlable sizes) . These plots follow a title and are followed by some descriptive text. Please refer to me those commands and modules you find useful for this task.

What I have so far :

        fig = plt.figure()

        ax0 = fig.add_subplot( 223 )
        ax0.set_title( 'Phase folding for trial search #' + str(period_trial+1) + '.' )
        ax0.plot(phase, lc, '.')
        ax0.set_xlabel('Phase')
        
        ax1 = fig.add_subplot( 224 )
        ax1.set_title( 'Zoom for trial search #' + str(period_trial+1) + '.' )
        ax1.plot(phasezoom,lczoom,'.')
        ax1.set_xlabel('Phase')
                                             
        ax2 = fig.add_subplot( 222 )          # periodgram
        ax2.add_line(  lines.Line2D( [best_period,best_period], [min(power),max(power)],linestyle='dashed',color='red') )
        ax2.set_title('Periodgram')
        ax2.semilogx(per, power, 'k-', lw=2)
        ax2.set_xlabel('Period [days]')
        ax2.set_ylabel('BLS power')  
Best regards!
There are quite a few PDF packages available here: https://pypi.python.org/pypi?%3Aaction=s...mit=search
I'm not up to date on which is best.
A good bet is to check the date the package was created, the last update, and how many downloads have occurred.