Message Boards Message Boards

0
|
12057 Views
|
8 Replies
|
9 Total Likes
View groups...
Share
Share this post:
GROUPS:

Is it possible to combine two graphs into one?

Posted 9 years ago

I'd like to produce a graph comparing South African gdp per capita with the ZAR/USD exchange rate on a single graph. Is this possible, and if so, how would I do it? Or do I have to go back to R?

I have tried variations of: south africa gdp, ZAR USD exchange rate

POSTED BY: Evan Dembskey
8 Replies
Posted 9 years ago

Thanks - I really need to get a full copy of Mathematica!

POSTED BY: Evan Dembskey

Though @Sean Clarke has a good point, I would like to add, that it is sometimes used in a legitimate way, just to align two datasets, not to compare them, or to compare trends. See the figure below, which I made and published. The difference between the blue data and the black lines is given as a percentage with the green dots, on a separate scale.

enter image description here

This time I did not make the right part of the frame green (they probably won't like that at the journal), but used an arrow to indicate that you should look at the right axis.

POSTED BY: Sander Huisman
Posted 9 years ago
POSTED BY: Evan Dembskey

Hi Evan,

I just put custom FrameTicks on it:

rticks=Table[{10i,i},{i,1,2}]
ListPlot[Range[5]^2,Frame->True,FrameTicks->{{Automatic,rticks},{Automatic,Automatic}}]

this is a minimal example:

enter image description here

Of course you have two tweak it to fit your needs.

POSTED BY: Sander Huisman
Posted 9 years ago
POSTED BY: Evan Dembskey
POSTED BY: Sean Clarke

Beautiful example! Thanks for sharing.

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 9 years ago
POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract