Message Boards Message Boards

0
|
5923 Views
|
13 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Plot several 2D plots on one 3D graph?

Hi,

I have three lists as below, I'd like to plot them in a 3D plot. Could you please let me know, how to do this using ListLinePlot3D or other commands in Mathematica?

I really appreciate your help!

RF = {0.661364448`, 0.659606784`, 0.655400831`, 0.662659672`, 
  0.66587247`, 0.654697718`, 0.645638171`, 0.655319833`, 0.669298311`,
   0.645871986`, 0.644753991`, 0.646067736`, 0.651070895`, 
  0.657280147`, 0.655479775`, 0.671155538`, 0.679573807`, 
  0.699874225`, 0.701011724`, 0.676778482`, 0.702745674`, 
  0.707316941`, 0.711617827`, 0.71765958`, 0.693996288`, 0.693463408`,
   0.692490649`, 0.701695076`, 0.722543184`, 0.741700268`, 
  0.71271051`, 0.725881931`, 0.737262952`, 0.749573359`, 0.76150919`, 
  0.756232284`, 0.628167019`, 0.628167019`, 0.727129395`, 
  0.749505303`, 0.756175837`, 0.74753598`, 0.748973776`, 0.590215667`,
   0.615802687`, 0.619031332`, 0.613749052`, 0.612289644`}

DL = {0.655124672`, 0.656104543`, 0.659458499`, 0.680739677`, 
  0.672725429`, 0.653227846`, 0.653111463`, 0.655929073`, 
  0.660622501`, 0.649022756`, 0.649752214`, 0.650428697`, 
  0.652423858`, 0.65264585`, 0.652678576`, 0.680767624`, 0.664989505`,
   0.67934401`, 0.681090918`, 0.662133764`, 0.69541549`, 0.701374117`,
   0.713501389`, 0.722474241`, 0.682516396`, 0.683915727`, 
  0.686621471`, 0.698980624`, 0.726416994`, 0.761214231`, 
  0.717239152`, 0.739817963`, 0.751380972`, 0.774232118`, 
  0.781827666`, 0.783876661`, 0.60584739`, 0.685220569`, 0.755807031`,
   0.766897467`, 0.773773527`, 0.77471428`, 0.777444653`, 
  0.599312425`, 0.60054583`, 0.601741588`, 0.604204445`, 0.60645107`}

GBM = {0.673667336`, 0.670689967`, 0.664935155`, 0.673166307`, 
  0.673166307`, 0.669390466`, 0.659117181`, 0.66762394`, 0.673754702`,
   0.659117181`, 0.661994628`, 0.659664303`, 0.666310085`, 
  0.66781346`, 0.66781346`, 0.673166307`, 0.683694492`, 0.697433529`, 
  0.698704237`, 0.666966031`, 0.697433529`, 0.697433529`, 
  0.701317188`, 0.710124684`, 0.698722419`, 0.698722419`, 
  0.698722419`, 0.703414781`, 0.705398209`, 0.724737302`, 
  0.704864635`, 0.715431363`, 0.725169486`, 0.731770717`, 
  0.732912709`, 0.732912709`, 0.712080891`, 0.712080891`, 
  0.721412104`, 0.7348725`, 0.73750462`, 0.737907344`, 0.737907344`, 
  0.613436498`, 0.630101611`, 0.630101611`, 0.630101611`, 0.630101611`}
POSTED BY: M.A. Ghorbani
13 Replies

Dear Henrik,

I couldn’t have done it without you.

Thanks for being such a star :-)

POSTED BY: M.A. Ghorbani

OK then, I have two solutions to offer:

1) Quick and dirty, using the already nice approach from @Rohit Namjoshi:

lpp = ListPointPlot3D[Transpose@*Reverse@{OBS, RF, DL, GBM, GLM}, 
   Filling -> Bottom, FillingStyle -> Orange, PlotStyle -> Orange];
lpp /. Point -> Line@*(Partition[#, Length[GLM]] &)

enter image description here

2) Using Graphics3D:

llow = Min[{OBS, RF, DL, GBM, GLM}];
length = Length[OBS];
data0 = Table[{x, y, {OBS, RF, DL, GBM, GLM}[[y, x]]}, {y, 1, 5}, {x, 1, length}];
data1 = MapIndexed[Join[{{0, First[#2], llow}}, #1, {{length + 1, First[#2], llow}}] &, data0];
Graphics3D[{Opacity[.5], Polygon /@ data1}, BoxRatios -> {1, 1, 1/2}, Axes -> True, Lighting -> {{"Ambient", Orange}}]

enter image description here

Hope that helps, regards -- Henrik

POSTED BY: Henrik Schachner

I got below graph with adding Point->Line: enter image description here But I want to have a figure like :

enter image description here

POSTED BY: M.A. Ghorbani
Posted 5 years ago

How about this?

ListPointPlot3D[{RF, DL, GBM}, Filling -> Bottom, FillingStyle -> Orange, PlotStyle -> Orange]

enter image description here

POSTED BY: Rohit Namjoshi

Many thanks Brad.

Indeed I want to plot a graph like as below image :

enter image description here

For my below data.

OBS = {0.670994153`, 0.671010714`, 0.67267419`, 0.668473616`, 
  0.661080435`, 0.652673783`, 0.653138756`, 0.655948918`, 
  0.661869409`, 0.638224869`, 0.638979982`, 0.639642394`, 
  0.642630481`, 0.643617257`, 0.644126419`, 0.701789017`, 
  0.698119952`, 0.706185231`, 0.707290186`, 0.65831415`, 0.694930072`,
   0.701154503`, 0.711700059`, 0.718360653`, 0.657258235`, 
  0.666121701`, 0.679998013`, 0.699887249`, 0.722880638`, 
  0.751875398`, 0.704695709`, 0.73018907`, 0.742919112`, 0.764319337`,
   0.77218462`, 0.774527334`, 0.71726397`, 0.719690721`, 0.75008694`, 
  0.768600531`, 0.778274357`, 0.779502355`, 0.782995775`, 
  0.573973274`, 0.598033955`, 0.599596501`, 0.602287296`, 0.604525679`}

RF = {0.661364448`, 0.659606784`, 0.655400831`, 0.662659672`, 
  0.66587247`, 0.654697718`, 0.645638171`, 0.655319833`, 0.669298311`,
   0.645871986`, 0.644753991`, 0.646067736`, 0.651070895`, 
  0.657280147`, 0.655479775`, 0.671155538`, 0.679573807`, 
  0.699874225`, 0.701011724`, 0.676778482`, 0.702745674`, 
  0.707316941`, 0.711617827`, 0.71765958`, 0.693996288`, 0.693463408`,
   0.692490649`, 0.701695076`, 0.722543184`, 0.741700268`, 
  0.71271051`, 0.725881931`, 0.737262952`, 0.749573359`, 0.76150919`, 
  0.756232284`, 0.628167019`, 0.628167019`, 0.727129395`, 
  0.749505303`, 0.756175837`, 0.74753598`, 0.748973776`, 0.590215667`,
   0.615802687`, 0.619031332`, 0.613749052`, 0.612289644`}

DL = {0.655124672`, 0.656104543`, 0.659458499`, 0.680739677`, 
  0.672725429`, 0.653227846`, 0.653111463`, 0.655929073`, 
  0.660622501`, 0.649022756`, 0.649752214`, 0.650428697`, 
  0.652423858`, 0.65264585`, 0.652678576`, 0.680767624`, 0.664989505`,
   0.67934401`, 0.681090918`, 0.662133764`, 0.69541549`, 0.701374117`,
   0.713501389`, 0.722474241`, 0.682516396`, 0.683915727`, 
  0.686621471`, 0.698980624`, 0.726416994`, 0.761214231`, 
  0.717239152`, 0.739817963`, 0.751380972`, 0.774232118`, 
  0.781827666`, 0.783876661`, 0.60584739`, 0.685220569`, 0.755807031`,
   0.766897467`, 0.773773527`, 0.77471428`, 0.777444653`, 
  0.599312425`, 0.60054583`, 0.601741588`, 0.604204445`, 0.60645107`}

GBM = {0.673667336`, 0.670689967`, 0.664935155`, 0.673166307`, 
  0.673166307`, 0.669390466`, 0.659117181`, 0.66762394`, 0.673754702`,
   0.659117181`, 0.661994628`, 0.659664303`, 0.666310085`, 
  0.66781346`, 0.66781346`, 0.673166307`, 0.683694492`, 0.697433529`, 
  0.698704237`, 0.666966031`, 0.697433529`, 0.697433529`, 
  0.701317188`, 0.710124684`, 0.698722419`, 0.698722419`, 
  0.698722419`, 0.703414781`, 0.705398209`, 0.724737302`, 
  0.704864635`, 0.715431363`, 0.725169486`, 0.731770717`, 
  0.732912709`, 0.732912709`, 0.712080891`, 0.712080891`, 
  0.721412104`, 0.7348725`, 0.73750462`, 0.737907344`, 0.737907344`, 
  0.613436498`, 0.630101611`, 0.630101611`, 0.630101611`, 0.630101611`}

GLM = {0.67643252`, 0.676587775`, 0.675891007`, 0.659645388`, 
  0.669297572`, 0.676314679`, 0.675275772`, 0.672047931`, 
  0.666208799`, 0.673838919`, 0.672346143`, 0.671263169`, 
  0.667131673`, 0.665887778`, 0.665258733`, 0.659820366`, 
  0.677046451`, 0.675045849`, 0.674622302`, 0.68794523`, 0.702484833`,
   0.703854302`, 0.705497018`, 0.706097072`, 0.631234361`, 
  0.649971119`, 0.67488782`, 0.701420163`, 0.721549322`, 0.735573687`,
   0.665326529`, 0.722588965`, 0.74039248`, 0.760572687`, 
  0.765648764`, 0.766954752`, 0.577549799`, 0.609922778`, 0.7442199`, 
  0.777977871`, 0.790116577`, 0.791450555`, 0.795016012`, 
  0.650052304`, 0.600401464`, 0.591253918`, 0.573007039`, 
  0.555148866`}
POSTED BY: M.A. Ghorbani
Graphics3D[
 Line[{MapIndexed[{#2[[1]], #1, 0} &, RF], 
   MapIndexed[{#2[[1]], #1, 1} &, DL],
   MapIndexed[{#2[[1]], #1, 2} &, GBM]}], BoxRatios -> 1]
POSTED BY: Gianluca Gorni

Dear Gorni,

I really appreciate your help.

POSTED BY: M.A. Ghorbani

How about This?

Graphics3D[Transpose[{{Red, Green, Blue},
   MapIndexed[
    Function[{dat, ind}, 
     MapIndexed[Sphere[{#2[[1]], 5 ind[[1]], 200 #1}, 1] &,
      dat]], {RF, DL, GBM}]}], Boxed -> False]

data

POSTED BY: Brad Klee

An example attached. Thank so much.

enter image description here

POSTED BY: M.A. Ghorbani

Maybe this?

BarChart3D[{RF, DL, GBM}]
POSTED BY: Gianluca Gorni

Dear Gianluca,

Thank for the command.

I got this :(enter image description here

POSTED BY: M.A. Ghorbani

Please give a better explanation of what you have in mind.

POSTED BY: Gianluca Gorni

Maybe this?

Graphics3D[Line[Transpose[{RF, DL, GBM}]]]
POSTED BY: Gianluca Gorni
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