PlotRange and FullGraphics

3 προβολές
Παράβλεψη και μετάβαση στο πρώτο μη αναγνωσμένο μήνυμα

Bruce Colletti

μη αναγνωσμένη,
9 Σεπ 2006, 3:42:36 π.μ.9/9/06
ως
Re Mathematica 5.2.

The code below vertically displays the x-ticklabels. However, despite the PlotRange->All option, each is slightly chopped off at its start.

Why don't the full labels appear?

Thankx.

Bruce

g = Plot[x, {x, 0, 1}];
g = FullGraphics@g;
g = g /. Text[text_, {x_,
y_ /; y < 0}, offset_] -> Text[text, {x, y}, offset, {0, 1}];

Show[g, PlotRange -> All];

Norbert Marxer

μη αναγνωσμένη,
10 Σεπ 2006, 7:31:51 π.μ.10/9/06
ως
Hi Bruce

If you change (in Show) the standard option PlotRegion -> {{0.0, 1.0},
{0.0, 1.0}} to

PlotRegion -> {{0.0, 1.0}, {0.01, 1.0}}

your graphics will be moved a little bit upwards and you will see the x
tickmarks.

Note that PlotRange is an option for graphics functions that specifies
what points to include in a plot.

Best Regards
Norbert Marxer
www.mec.li

dimm...@yahoo.com

μη αναγνωσμένη,
10 Σεπ 2006, 7:32:53 π.μ.10/9/06
ως
I just add ImageSize to your elegant code and everything looks fine.

In[29]:=


g = Plot[x, {x, 0, 1}];
g = FullGraphics@g;
g = g /. Text[text_, {x_,
y_ /; y < 0}, offset_] -> Text[text, {x, y}, offset, {0, 1}];

Show[g, PlotRange -> All,ImageSize->{400,300}];

Απάντηση σε όλους
Απάντηση στον συντάκτη
Προώθηση
0 νέα μηνύματα