I think you will find very similar behavior in other plotting packages like Excel and R. Scaling by the points plotted is the easy, simple thing to do. Maybe I could partially implement my own wish for a fixed-frame that could be applied to separate plots by plotting a fixed set of white points in a square?
On Tue, Mar 22, 2022 at 12:10 PM Raul Miller <[email protected]> wrote: > On Tue, Mar 22, 2022 at 5:50 AM Martin Kreuzer <[email protected]> > wrote: > > Thanks ... And I did some tests this morning: > > > > Plotted the *bisector (3rd, 1st quadrant) and *sin using > > > > pd 'xrange _1 1' > > pd 'yrange _1.1 1.1' > > and > > pd 'aspect xx' with these values: xx= 0.866 | 1.0 | 1.155 > > > > Results: > > > > aspect: 0.866 | 1.0 | 1.155 'xrange > _1 1' > > ------------------------------------------------------------- > > vertical/horizontal unit length: 0.81 | 0.92 | 1.05 > > height/width of grid frame: 0.87 | 1.0 | 1.15 > > > > 'aspect 1.0' does not produce an angle of 45 deg of tangent versus > > horizontal at the root as expected. > > Why would you expect this? > > My understanding is that aspect ratio was designed to compensate for > pixels which were not square. If you are working on a machine with > square pixels, the default aspect ratio (1) should be sufficient. > > In the general case (for example, xrange 0 1, yrange 0 1e6) plotting 0 > 0j1 1j1 1j0 0 is not going to give you something that looks like a > square. > > > Try it with a different xrange and have a look how distorted it becomes: > > > > aspect: 0.866 | 1.0 | 1.155 'xrange > _2 2' > > ------------------------------------------------------------- > > vertical/horizontal unit length: 1.57 | 1.83 | 2.13 > > height/width of grid frame: 0.87 | 1.0 | 1.15 > > > > This clearly shows (at least to me) that the aspect value is > > definitely governing the rectangular grid frame, and somehow (on the > > way) influencing the units ratio. > > That makes sense. But I am not sure that I agree with your implication > that we should view this as a problem. > > > I think that's a bug (as it should at least be the other way around). > > Therefore I still plead for a separate pf option of e.g. 'compression > > ratio' or 'units ratio' if possible. > > I am not sure if it's possible to implement such a thing -- it seems > like the resulting system would be overdetermined. But I am also not > clear on the purpose you had in mind for this mechanism. I think it > has something to do with the shape over the drawing window? > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA Quantitative Consultant ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
