positron icon indicating copy to clipboard operation
positron copied to clipboard

Update icon for plot zooming

Open timtmok opened this issue 1 year ago • 4 comments

The current icon is reusing the ruler icon for the plot sizing policy. This is confusing and needs its own icon.

The Positron codicons have already been updated with a new icon. positron-size-to-fit can be used for the plot zooming button.

Additionally, the option for Fill should be renamed to Fit on the button when selected and Fit to view (or something appropriate) to distinguish it from the sizing policy.

image

timtmok avatar Aug 20 '24 13:08 timtmok

I'm not sure if the second resize option ("plot zoom") is more or less redundant?

If you need larger plots, you can simply use the custom-size feature. Furthermore, a zoom size larger than 100% "blurs" the plot, while custom size resizes the plot w/o blurring.

The plot zoom just resizes the plot - I think what would be more useful is a "rescaling" (#3765), where the plot-size does not change, but where you can adjust plot-proportions (i.e. geoms, text/labels, and plot size have nice proportions).

strengejacke avatar Aug 22 '24 10:08 strengejacke

In combination with the custom size, you can then create plots of the desired size and proportions of plot elements.

strengejacke avatar Aug 22 '24 10:08 strengejacke

@strengejacke The first option is for scaling the image after it has been rendered. Currently, the plot is scaled to fit in the Plots view. Changing the plot's resolution (this is with the second resize option) can make the plot hard to see in a tiny view. Adding in the option for scaling (aka zooming), was easy to do since it's reusing some existing code. The phrasing is admittedly confusing, which I hope can be improved here.

There's currently work in progress to bring the plot into the editor space with its own render options. See #2270. That should make it easier to view a plot in a higher resolution and provide the space to view all of the detail instead of being scaled down to fit in the Plots view.

timtmok avatar Aug 22 '24 18:08 timtmok

Not sure if we talk about the same thing. What I think works be really great is not only to have an option to define the plot size (width * height on, e.g., pixels), but also to rescale elements, like shown on the video in #3765.

I think you use the plot viewer for two reasons: first, to see the plot. Second, to export the plot to file or clipboard. This may require higher resolutions, but the labels and geoms should still be readable and have appropriate proportions. This is something you cannot achieve at the moment, if I haven't missed something? Is this something that is planned to be covered in the future? If so, than I misunderstood you - sorry for that :-)

strengejacke avatar Aug 22 '24 21:08 strengejacke

Of course, I certainly see how it can be useful to adjust the plot to quickly see the changes but I believe it is beyond the scope of this issue.

There is a different kind of feature that I don't think is supported with R, but is with Python. There are events emitted for Python plots that will update the Plots view when executing code that changes the plot. I think this might be possible but would need support in Ark. However, I do see that it's reversed from what you want since that would be using code to changing the plot instead of actions from the Plots view.

timtmok avatar Aug 23 '24 18:08 timtmok

Verified Fixed

Positron Version(s) : 2024.09.0-1 OS Version(s) : Windows 11

Test scenario(s)

Icons updated as expected

image

jonvanausdeln avatar Sep 03 '24 16:09 jonvanausdeln