1. Degas painted in his studio, and he was based on the sketches.

2. Degas painted in his studio, and he was based on the sketches.

3. Degas painted in his studio, and his paintings were based on the sketches.

4. Degas painted in his studio, his paintings being based on the sketches.

5. Degas painted in his studio, with his paintings based on the sketches.

(I have written down other expressions. Are they all grammatical? Especially, what about #1? Is it grammatical? If not why is that?)

1 and 2 are incorrect.

3, 4, and 5 are fine.

Out of the five expressions you provided, all of them are grammatically correct and convey the intended meaning. However, some of them might sound more natural or commonly used than others. Let's go through them one by one:

1. "Degas painted in his studio, and he was based on the sketches."

This sentence is grammatically correct, but it seems a bit unclear and redundant. The phrase "he was based on the sketches" is not logical or grammatically coherent. It would be more appropriate to say "Degas painted in his studio, based on the sketches."

2. "Degas painted in his studio, and he was based on the sketches."

This sentence is identical to the first one and suffers from the same issue. It would be better to rephrase it as "Degas painted in his studio, based on the sketches."

3. "Degas painted in his studio, and his paintings were based on the sketches."

This sentence is grammatically correct and conveys the meaning clearly. It states that Degas painted in his studio, and the paintings he created were based on the sketches. This sentence is a straightforward way of expressing the relationship between Degas' studio work and the sketches.

4. "Degas painted in his studio, his paintings being based on the sketches."

This sentence is also grammatically correct, but it may sound a bit more formal or literary. The construction "his paintings being based on the sketches" is a participial phrase that describes the relationship between Degas' paintings and the sketches. It means that the paintings were created with the sketches as a basis. This sentence is less commonly used in everyday language.

5. "Degas painted in his studio, with his paintings based on the sketches."

This sentence is grammatically correct and conveys the intended meaning clearly. It uses the preposition "with" to indicate the relationship between Degas' painting in the studio and the fact that the paintings were based on the sketches. This sentence is a concise and commonly used way of expressing the idea.