Re: How to obtain FrameTicks List from an existing Plot?

t = Range[5];
p = ListPlot[t, Frame -> True];

FrameTicks /. AbsoluteOptions[p]

Bob Hanlon

---- Nasser Abbasi <nma@12000.org> wrote: 

I have a need to obtain the FrameTicks list from an existing plot. The reason I want to do this, is because I need to slightly modify the ticks, and then redraw the plot with the new Ticks. This would be much easier than having to generate the Ticks myself in the first place.

This is an example:

t = Range[5];
p = ListPlot[t, Frame -> True]

But when I look at FullForm[p], I see no list would would look like the FrameTicks, which should be something like  =

Here is the full form of p

In[103]:= FullForm[p]
Out[103]//FullForm= FullForm[Graphics[{Hue[0.67, 0.6, 0.6],
    Point[{{1., 1.}, {2., 2.}, {3., 3.}, {4., 4.},
      {5., 5.}}]}, {AspectRatio -> GoldenRatio^(-1),
    Axes -> True, AxesOrigin -> {0, Automatic},
    Frame -> True, PlotRange -> Automatic,
    PlotRangeClipping -> True}]]

Again, I was hoping to obtain the [{x1,label},{x2,label},.....] list from Mathematica (let it do the hardwork), and then I wanted to just 'shift' the position of the ticks a little by having a loop with adds some delta to each x_i, then I would redraw the ListPlot with my new FrameTicks.

If FrameTicks are not in the FullForm[], then they must be hiding somewhere else, but where?

Any idea if this is possible?

Thank you,

hanlonr (2279)
10/5/2009 5:17:34 PM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 41


Similar Artilces:

RE: multiple list plot and frameticks
Nathan, << Graphics`Graphics` << Graphics`MultipleListPlot` flist = Table[{p, 4.Exp[-5. p]}, {p, 1, 15, 2}]; dx = Transpose[flist][[1]] dy = Transpose[flist][[2]] MultipleListPlot[Transpose[{dx, Log[10, dy]}], SymbolShape -> {PlotSymbol[Box, 2]}, Axes -> False, Frame -> True, FrameTicks -> {Automatic, LogScale, Automatic, Automatic}, ImageSize -> 450]; That works except that we would probably prefer not to have the "1. x" on all the tick labels, or the form "0.001" and the right hand tick marks do not corres...

Re: Re: Bode Plots in Mathematica
Nasser, As I said in the earlier posting, the BodePlot routine is in the DrawGraphics Help under Examples, LogPlots & Bode Plots. It is not a built-in routine in DrawGraphics, but the code is there in the example and can be copied and modified if desired. The BodePlot allows plot options to be passed and these can override the built-in options. Thus you could pass FrameLabel -> {"frequency (rad/sec)",...} if you wished. You could modify the nformat routine for the horizontal ticks, but I don't think that 10^(-1), 10^0, and 10^1 look that great. Everyone to t...

Re: Overlaying List...Plots with other Plots?
On 9/20/09 at 6:23 AM, max@alcyone.com (Erik Max Francis) wrote: >What's the smoothest way to draw a ListPlot (or its friends, >ListLogPlot, ListLogLogPlot, etc.) with another plot of just a >normal function (which is actually a curve fit to the data) on top >of the ListPlot? >I know that I can just do two plots (which are just Graphics objects >anyway) and then show them simultaneously with show, but since it's >a ListPlot, but since I'm dealing with an arbitrary set of data I >don't know what the bounds of the plot will be, so I don't s...

Re: Overlaying List...Plots with other Plots? #3
On 9/22/09 at 7:09 AM, max@alcyone.com (Erik Max Francis) wrote: >Bill Rowe wrote: >>I don't know that there is a standard way. And as for proper way, I >>would say anything that yields the desired result can be considered >>proper. In any case, here is one way >>data = RandomReal[1, {10, 2}]; f = FindFit[data, m x + b , {m, b}, >>x]; >>Plot[m x + b /. f, {x, 0, 1}, Frame -> True, Axes -> None, Epilog >>-> {Point[data]}, PlotRange -> {.95 Min@data[[All, 2]], 1.05 >>Max@data[[All, 2]]}] >Thanks to everyone w...

Re: Sort a List, in a List of Lists of Lists
On 11/13/10 at 12:59 AM, leigh.pascoe@inserm.fr wrote: >I have a lsit of Lists of Lists: >{{{1,2},{2,1},{1,1}},{{1,1},{1,1},{1,2}},{{2,1},{2,2},{1,2}},{{2,2}, >{1,2},{2,2}},{{1,1},{2,1},{1,2}},{{1,2},{2, 2},{2,2}}} >I would like to sort the elements in the lowest level of brackets to >give >{{{1, 2}, {1, 2}, {1, 1}}, {{1, 1}, {1, 1}, {1, 2}}, {{1, 2}, {2, >2}, {1, 2}}, {{2, 2}, {1, 2}, {2, 2}}, {{1, 1}, {1, 2}, {1, 2}}, >{{1, 2}, {2, 2}, {2, 2}}} >i.e retaining the same structure with the paired elements in the >original order. I can't seem...

Re: Re: 3d plots in mathematica 5.0
Hi Fiz, > > Here is the function > > w=exp(-2(x^2+y^2/r0^2))*exp(-2(z^2/z0^2)) > > r0=1.4 and z0=1.4 The function is Exp, not exp, and it needs square brackets not parentheses. r0 = 1.4; z0 = 1.4; w = Exp[(-2(x^2 + y^2/r0^2))]*Exp[(-2(z^2/z0^2))] // FullSimplify The function you're after is ContourPlot3D, and you use it like Needs["Graphics`ContourPlot3D`"] ContourPlot3D[w, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Contours -> {.75}, \ PlotRange -> All, Axes -> True, BoxRatios -> {1, 1, 1}]; This produces "something",...

Re: Re: Give a list of options in Mathematica 6
Attributes[Plot] {HoldAll,Protected} Attributes[ListPlot] {Protected} Bob Hanlon ---- Giacomo Ciani <jackspam79@gmail.com> wrote: > On 7 Gen, 13:28, Bob Hanlon <hanl...@cox.net> wrote: > > Attributes[Plot] > > > > {HoldAll,Protected} > > > > opts = {PlotRange -> {0, 1}, AxesOrigin -> {0, 0.5}}; > > > > Plot[x, {x, 0, 1}, Evaluate[opts]] > > > > Bob Hanlon > > > > ---- Giacomo Ciani <jackspa...@gmail.com> wrote: > > > > > Hi all, > > > > > ...

Re: Re: math glyphs from non-Mathematica font
On Fri, 22 May 2009 01:50:51 -0400 (EDT), skkaul wrote: > On May 10, 5:13 am, John Fultz <jfu...@wolfram.com> wrote: > >> <install= >> directory>/SystemFiles/FrontEnd/TextResources/UnicodeFontMapping.tr >> > Besides the comments, is there any documentation on this file? In > particular, what are type V and H entries, and what font is referenced > by -2? > > Thanks, > Shiva It's not documented because it's not intended for user consumption, although being able to edit it very rarely allows working around certain issues...

Re: Re: 3d plots in mathematica 5.0 #3
In this particular case we can parametrize the contour surfaces. Looking for the constant values surface, we obtain a simplification to ellipsoids. Exp[-2*(x^2 + y^2/r0^2)]*Exp[-2*(z^2/z0^2)] == c Simplify[%] % /. x^2 + y^2/r0^2 + z^2/z0^2 -> k2 Solve[%, k2][[2,1]] krule = % /. k2 -> k^2 Write the equation for the constant value ellipsoid in terms of contour value c. x^2 + y^2/r0^2 + z^2/z0^2 == k^2 % /. krule (Distribute[#1/(-Log[c]/2)] & ) /@ % Standard parametrization of an ellipsoid (from Alfred Gray, Modern Differential Geometry).... ellipsoid[a_, b_, c_...

Re: Re: 3d plots in mathematica 5.0 #4
Hi David, <snippage> Very nice! Begs the question as to why anyone would bother with ContourPlot3D .... Regards, Dave ...

Re: Re: my wish list for Mathematica next major version
----- Original Message ----- From: <carlos@colorado.edu> Subject: Re: my wish list for Mathematica next major version > I fully agree with the first item. Each year I normally teach > 3 engineering courses (2 graduate, 1 undergraduate) > that use Mathematica as one of the tools for problem > solving. Typical undergraduate enrollment: 80-100, > graduate: 35-50, so it is not a tiny sample. > > By far the 3 biggest complaints heard year after year: > > 1) Incomprehensible and untraceable error messages. In the default case Mathematica coll...

Re: Re: 3d plots in mathematica 5.0 #5
Hi David, I suppose because it is not always possible to simply parametrize the contour surfaces. David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ From: David Annetts [mailto:davidannetts@aapt.net.au] Hi David, <snippage> Very nice! Begs the question as to why anyone would bother with ContourPlot3D .... Regards, Dave ...

Re: Re: my wish list for Mathematica next major version #3
Hi Pratik, I never get anywhere near academia, but it is clear from postings on MathGroup and many private communications I have had that things could be better with respect to technical computing in education. Specifically, it is not fair that students should be expected to learn technical material and Mathematica, or any other CAS, at the same time. Perhaps students who are in careers using mathematics should have a required one semester Freshman course in Mathematica or the CAS of their choice. They still wouldn't know everything but at least they wouldn't be stumbling o...

Re: Re: my wish list for Mathematica next major version #4
Two points. 1) Mathematica, or a comparable CAS, should suffice for all the basic educational technical computing requirements in universities. 2) Students who are not capable of handling university material and performing at university level should not be there. Elaboration. 1) In my view, Mathematica is not just another in a mix of computer languages (C++, Perl, Java, Mathematica, microassembler, AutoCAD, SolidWorks, Labview, etc). That list makes no more sense than (calculator operation, penmanship, mathematics, greek alphabet, typing, decimal operations). Mathematica is...

Web resources about - Re: How to obtain FrameTicks List from an existing Plot? - comp.soft-sys.math.mathematica

Resources last updated: 2/7/2016 6:02:44 PM