MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: listplot and notebook directory

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15388] Re: listplot and notebook directory
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Tue, 12 Jan 1999 03:14:51 -0500
  • Organization: University of Western Australia
  • References: <779bkt$b7o@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Maarten.vanderBurgt at icos.be wrote:

> When I execute the following command the result is a listplot where the
> data points ares fairly big filled black circles.
>      In[1]:=   ListPlot[{0,2,4,9,16,25},PlotStyle->PointSize[0.05]]
> 
> The following gives a plot where the data points are joined by a line.
>      In[2]:=   ListPlot[{0,2,4,9,16,25},PlotJoined -> True]
> 
> With the following I would expect the combination of the two. It does
> however give the same results as In[2]: the
> "PlotStyle->PointSize[0.05]" options doesn't seem to have any effect
> here. Is this intended behaviour or is this a bug?
>      In[3]:=   ListPlot[{0,2,4,9,16,25},PlotJoined -> True,
> PlotStyle->PointSize[0.05]]
> 
> Is there a way you can have both options "PlotJoined -> True" and
> "PlotStyle->PointSize[0.05]"?

One way is to use Epilog.

In[1]:= data = {0, 2, 4, 9, 16, 25};  In[2]:= ListPlot[data, PlotJoined
-> True, Epilog -> {PointSize[0.05], 
     ListPlot[data, DisplayFunction -> Identity][[1]]}];

You are effectively producing two plots and merging them. 

Alternatively, you can "extend" your data:

In[3]:= data = Transpose[{Table[i, {i, Length[data]}], data}];  In[4]:=
ListPlot[data, PlotJoined -> True, Epilog -> 
	{PointSize[0.05], Point /@ data}]; 

> Is there a command which gives the directory where the current notebook
> resides?

NotebookInformation[SelectedNotebook[]] gives you the information you
want. 

> This would be very usefull when
> you want to read in data from an ascii file which sits in the same
> directory as the notebook file. It would make moving the whole
> directory much easier: you would not have to retype a fairly long
> network directory path.

Related to your request, if you do a search on "notebook directory" at
DejaNews <http://www.dejanews.com/> under
news:comp.soft-sys.math.mathematica, you will find the posting by P.J.
Hinton on 98/08/19 entitled Re: first usage of a button.  You can
access this directly at the following URL   

http://x15.dejanews.com/getdoc.xp?AN=382536764&CONTEXT=916040102.1348337715&hitnum=1

Cheers,
	Paul
 
____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at physics.uwa.edu.au  AUSTRALIA                       
http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: Two Dimensional Interpolating Function
  • Next by Date: Re: setting X and Y range in 2D plots
  • Previous by thread: Re: listplot and notebook directory
  • Next by thread: Re: listplot and notebook directory