Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Re: How to get the options for ListPlot in V6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82991] Re: [mg82960] Re: How to get the options for ListPlot in V6
  • From: "Ricardo Samad" <resamad at gmail.com>
  • Date: Tue, 6 Nov 2007 03:43:24 -0500 (EST)
  • References: <fghbjr$iu1$1@smc.vnet.net> <200711050958.EAA09655@smc.vnet.net>

Dear David,

I am running Mathematica 6.0.0 in a Windows XP Pro, and all your examples
below gave the correct values for PlotRange and AxesOrigin:

{PlotRange -> {{0., 11.}, {9.04894, 10.9511}},  AxesOrigin -> {0., 9.5}}

Which version are your running?

Regards,

Ricardo


These values only change in the examples that you have explicited the
PlotRange, but even in these cases the values reflect the displayed plot.

On Nov 5, 2007 6:58 AM, David Park <djmpark at comcast.net> wrote:

> This is just another case where Mathematica graphics is messing around
> with
> what is displayed in a plot but not leaving a public record of it. It is
> very poor practice on the part of WRI. There were certainly many brillian=
t
> advances in Version 6 graphics but precise control of ticks and the
> internal
> bypassing of options is not one of them.
>
> Here is your case again. Clearly, PlotRange and AxesOrigin do not reflect
> the displayed plot.
>
> test1list = Sin[2 \[Pi] Range[0, 1, .1]] + 10;
> plot1 =
>  ListPlot[test1list]
> AbsoluteOptions[plot1, {PlotRange, AxesOrigin}]
>
> However, if we put almost anything in the plot that requires absolute
> coordinates then the options will reflect the displayed plot. For example=
,
> we can use Filling.
>
> plot1 = ListPlot[test1list, Filling -> 10]
> AbsoluteOptions[plot1, {PlotRange, AxesOrigin}]
>
> Or we could use Tooltips.
>
> plot1 = ListPlot[Tooltip@test1list]
> AbsoluteOptions[plot1, {PlotRange, AxesOrigin}]
>
> Probably the best solution is to use DataRange.
>
> plot1 = ListPlot[test1list, DataRange -> Automatic]
> AbsoluteOptions[plot1, {PlotRange, AxesOrigin}]
>
> Another solution is to give an explicit PlotRange.
>
> plot1 = ListPlot[test1list, PlotRange -> {{0, 11}, {9, 11}}]
> AbsoluteOptions[plot1, {PlotRange, AxesOrigin}]
>
> However, if we specify only the vertical PlotRange then the horizontal
> PlotRange is still incorrect.
>
> plot1 = ListPlot[test1list, PlotRange -> {9, 11}]
> AbsoluteOptions[plot1, {PlotRange, AxesOrigin}]
>
> Nor does specifying the AxesOrigin correct the PlotRange.
>
> plot1=ListPlot[test1list,AxesOrigin->{0,10}]
> AbsoluteOptions[plot1,{PlotRange,AxesOrigin}]
>
> I don't think there is a reasonable explanation for this behavior from th=
e
> standpoint of a user interface. It is just poor code and poor design.
>
>
> --
> David Park
> djmpark at comcast.net
> http://home.comcast.net/~djmpark/ <http://home.comcast.net/%7Edjmpark/>
>
>
> "Aranthon" <a.dwarf at gmail.com> wrote in message
> news:fghbjr$iu1$1 at smc.vnet.net...
> > Hello all,
> >
> > I apologize if this has been discussed here already, but I couldn't
> > find anything in the archives,
> >
> > I'm trying to write a function that manipulates the results of a
> > ListPlot automatically, and to do so, I need to know the option values
> > for PlotRange and AxesOrigin.  Unfortunately, the results from
> > AbsoluteOptions aren't making a lot of sense - the value for PlotRange
> > is set to {{0,1},{0,1}}, and AxesOrigin is {0,0}, regardless of the
> > actual values.
> >
> > For example:
> >
> > test = ListPlot[Sin[2 \[Pi] Range[0, 1, 0.1]] + 10]
> >
> > produces a plot where x ranges from 0 to 2 pi and y varies from 9 to
> > 11.  But
> >
> > AbsoluteOptions[test, PlotRange]
> >
> > returns {PlotRange -> {{0., 1.}, {0., 1.}}}
> >
> > If I load the Version5`Graphics` package, it works fine, so I'm
> > wondering what changed in V6, and what Options I should be looking at
> > to get the right answers.
> >
> > Thanks in advance for any replies,
> >
> > Greg
> >
> >
>
>
>


--
____________________________________
Ricardo Elgul Samad

tel: (+55 11) 3133-9372
fax: (+55 11) 3133-9374

Centro de Lasers e Aplica=E7=F5es
IPEN/CNEN-SP
AV. Prof. Lineu Prestes 2242
Cidade Universit=E1ria
05508-000
S=E3o Paulo - SP
Brazil
____________________________________



  • Prev by Date: Re: Dynamic palette of open notebooks
  • Next by Date: Re: Re: Jagged Spine (MultinormalDistribution)
  • Previous by thread: Re: How to get the options for ListPlot in V6
  • Next by thread: Eliminate items in q equation.