Getting portraits is linked to winning contests. In each of the contest halls, there is an artist who draws a sketch of the Pokemon that won the contest. When you win the Master level, he may draw a more detailed picture of your Pokemon. The artist doesn't always draw a more detailed picture of that Pokemon. So when you enter the master contest you must make sure that there is a heart above the artist's head.
If the artist does draw a more detailed picture, he will ask you if he should take it to the art museum. Tell him yes. If you go to the upper floor of the museum, you will see his painting of your winning Pokemon.
Notice that the more paintings you show in the museum, the more people come to see them. If you fill the art gallery completely, someone will give you a Glass Sculpture for your Secret Base. He will also give your Pokemon a ribbon for being "super-sketched"