|
From: Thomas S. <t.s...@fz...> - 2009-11-14 18:19:04
|
have a look at this script: reset ##----Setting small tics set mytics set mxtics unset key ##--Setting y-range for all plots set yrange[0:1] ## Setting ylabels for all plots set ylabel "EW (A)" ##Defining variables SX = 0.9; SY = 0.2 OX = 0.05; OY = 0.05 NX = 1; NY = 3 set ytics -0.6,0.2,0.8 set xtics -10.0,2,10 ## define and then unset x2tics for later use set x2tics -10.0,2,10 unset x2tics PY = 0.198 ##Setting margins set bmargin OX; set tmargin OX; set lmargin OY; set rmargin OY set size SX*NX+OX*1.5, SY*NY+OY*1.8 ## reserve some space for x- and y-labels by shifting ## the plots a little bit OX=1.7*OX OY=1.5*OY set multiplot ## First plot from bottom------------------------------------ set size SX,SY set origin OX,OY set xtics set xlabel "Spectral Type" plot sin(x) ## Second plot from bottom------------------------------------ set origin OX,PY+OY unset xlabel set xtics format "" plot cos(x) ## Third plot from bottom------------------------------------- set origin OX,PY*2 + OY plot tan(x) ## Fourth plot from bottom------------------------------------ set origin OX,PY*3 + OY ## switch x2tics on set x2tics plot sin(x)*exp(x) unset multiplot Trillianx wrote: > > Sorry, in my previous post I am able to get solutions for question (1) and > (2). However I cannot find an answer to Question (3). Thus please ONLY > address question (3). Which is: > > 3. I would like to have the xtics to appear for all plots but the numbers > ONLY for the bottom plot. How do I make it happen? > > Thanks! > > Trillian. > > > Trillianx wrote: >> >> I have been using the multiplot function in gnuplot to recreate the plot >> from my first post. I am using gnuplot 4-2.5, However I have few problems >> ( Please scroll down to see the attached plot. >> >> 1. The ylabel does not work for all plots. Where should I position the >> ylabel? >> 2. I would like to have the xlabel ONLY for the bottom plot. Where do I >> place the xlabel? Positioning as you can see in the code does not work. >> 3. I would like to have the xtics to appear for all plots but the numbers >> ONLY for the bottom plot. How do I make it happen? >> >> ##----Setting small tics >> set mytics >> set mxtics >> unset key >> >> ##--Setting y-range for all plots >> set yrange[0:1] >> >> ## Setting ylabels for all plots >> set ylabel "EW (A)" >> >> ##Defining variables >> SX = 0.9; SY = 0.2 >> OX = 0.05; OY = 0.05 >> NX = 1; NY = 3 >> set ytic -0.6,0.2,0.8 >> set xtic -10.0,2,10 >> PY = 0.198 >> >> ##Setting margins >> set bmargin OX; set tmargin OX; set lmargin OY; set rmargin OY >> set size SX*NX+OX*1.5, SY*NY+OY*1.8 >> >> set multiplot >> ## First plot from bottom------------------------------------ >> set size SX,SY >> set origin OX,OY >> set xtics >> set xlabel "Spectral Type" >> plot sin(x) >> >> ## Second plot from bottom------------------------------------ >> set origin OX,PY+OY >> unset xlabel >> unset xtics >> plot cos(x) >> >> ## Third plot from bottom------------------------------------- >> set origin OX,PY*2 + OY >> plot tan(x) >> >> ## Fourth plot from bottom------------------------------------ >> set origin OX,PY*3 + OY >> plot sin(x)*exp(x) >> unset multiplot >> >> Thank you so much!! >> >> Rohit >> >> http://old.nabble.com/file/p26351939/screen-capture-1.jpg >> >> Trillianx wrote: >>> >>> I am not sure how to describe this but I would like to create plots that >>> look like those in the attached figure. How do you create these? Please >>> note that this is just on plot with many subplots. >>> >>> I know the basics of GNUPLOT but I am not sure how to put the plots >>> together as shown in the attached figure. So please just tell me how to >>> stack them one top of the other. >>> >>> Thank you so much !! >>> http://old.nabble.com/file/p26230858/screen-capture-1.jpg >>> >>> >> >> > > -- View this message in context: http://old.nabble.com/Getting-more-plots-on-one%21-tp26230858p26352432.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |