Python Forum
Create PDF with text from PNGs
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create PDF with text from PNGs
#1
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!
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to create a tool with tkinter to convert img to text rachidel07 3 2,550 Feb-05-2021, 12:21 PM
Last Post: deanhystad
  create an array of each line of text macieju1974 7 3,387 Jun-07-2020, 06:30 PM
Last Post: Yoriz
  How can Read text file and create array? puneet102 1 2,579 May-22-2018, 06:41 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020