ggplot in python-part 5

The main factor affecting price is the carat. In this post we shall evaluate how the two factors fare.

PRICE VS CARATS

pptc1

pptc2

pptc3

ppt4

OBSERVATION: As the value of carat increases, the price goes up. The line of regression is quadratic. Thus, price is affected by carat including other factors as well.

pptc6

pptc5

pptc7

pptc8

OBSERVATION: Upon further scaling, we see that observation 1 is turning out to be true, for a given value of carat the price varies.

The graph below shows how it varies according to clarity.

pptc26

OBSERVATION: We see that diamonds with higher clarity index from blue to purple, have higher prices in comparison to the diamonds with low clarity index. Hence, clarity index affects the value of price, at a given carat.

The graphs below show various of price VS carat, with variation in color, cut and clarity receptively.

pptc31

pptc33

pptc34

Advertisements

3 thoughts on “ggplot in python-part 5

  1. Hello, what version of ggplot have you used ? I have some troubles reproducing these figures with the 0.6.8 version.
    Also, could you provide the code to produce the last 3 pictures ?
    Thanks in advance

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s