Message Boards Message Boards

0
|
1488 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Applying transformation to the plot as well as the GridLines?

Posted 1 year ago
Given a simple Plot[x, {x, -1, 1} GridLines->Automatic]

is there a way to apply transformation to the plot as well as the GridLines? For example

Plot[x, {x, -1, 1}, GridLines->Automatic]/.L_Line:>GeometricTransformation[L, ShearingTransform[Pi/4, {1,0}, {0,1}]]

will transform the plot but not the GridLines. Can the GridLines also be transformed?

POSTED BY: Jon Joseph
3 Replies
Posted 1 year ago

Thanks to both. Never heard of either of those functions.

POSTED BY: Jon Joseph
Posted 1 year ago

Try this:

p = Plot[x, {x, -1, 1}, GridLines -> Automatic];

ImageForwardTransformation[p,ShearingTransform[Pi/4,{1,0},{0,1}],PlotRange->All]

enter image description here

POSTED BY: Hans Milton

Here is an attempt with FullGraphics, a very old function:

fg = FullGraphics[Plot[x, {x, -1, 1},
    GridLines -> Automatic]]
Graphics[GeometricTransformation[fg[[1]],
  ShearingTransform[Pi/4, {1, 0}, {0, 1}]]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract