Is it legal/possible to apply for a patent based on an already published/submitted journal article? I want to apply for two patents.

The first one is based on a journal article (obviously written by me) which is published a few months before.

My first question is: Is it legal/possible to apply for a patent based on an already published journal article? Is it a kind of self-plagiarism?

The second patent application which I am currently writing is based on a manuscript which I am planning to submit to a journal soon.

So, my second question is: Will it be a problem if I submit both the patent application and the manuscript to a journal at the same time? Should I write this to the journal editor? 

My third question is: Is it unethical to keep the diagrams in the paper and patent almost the same?
Self-plagiarism is not the issue. The patent documents an invention. It is not a creative work itself. You could just stick a cover letter on your paper and submit that, in theory (as a provisional patent anyway). In practice, everyone says a patent that is not carefully written by a lawyer will be worthless. Lawyers especially tend to say this. However, different countries have different rules regarding copyright on the images used. So you may not want to reuse them if you transferred the copyright to a journal. 

Patents are required to be both non-obvious and novel. Your own publication can count as "prior art" proving your patent is no longer novel. This is also called a public disclosure, which usually means publishing or offering it for sale to others. Different countries have different laws regarding when you can patent something that has been publicly disclosed. The US gives you a year after publication. Many other countries give you no time; the idea can't be patented there after disclosure. Applying and submitting at the same time may work but you're right on the line there, so need to be careful in other countries.

https://en.wikipedia.org/wiki/Public_disclosure