Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Specify plot sizes with values #3078

Closed
bmatyasb opened this issue Dec 11, 2024 · 7 comments
Closed

[Feature Request]: Specify plot sizes with values #3078

bmatyasb opened this issue Dec 11, 2024 · 7 comments
Assignees
Labels
Component: Plot Editing Everything related to editing plot in JASP Duplicate This issue or pull request already exists Feature Request Waiting for requester If waiting for a long time it is reasonable to close an issue

Comments

@bmatyasb
Copy link

Description

It would be nice (actually essential) if the "Edit Image" window would allow you to specify the height and width of a plot by value.

Purpose

No response

Use-case

No response

Is your feature request related to a problem?

No response

Is your feature request related to a JASP module?

No response

Describe the solution you would like

No response

Describe alternatives that you have considered

No response

Additional context

Currently, we use JASP for performing statistical analyses. Often, we need to create multiple plots of the same type, such as residual plots, scatterplots, etc., for different variables. It is incredibly frustrating to have to manually adjust the plots using the cursor. The most straightforward solution would be to include a scaling option under the "Edit Image" section where we can adjust dimensions using numerical values (without cluttering the GUI), or to allow resizing a plot incrementally, for example, by holding down Shift while resizing. This would also address the issue where, in certain cases (e.g., when creating scatterplots with side densities and splitting by a categorical variable), the legend sometimes gets cut off. Enhancing the ability to resize plots would significantly improve the user experience and make the software much more versatile for comprehensive use.

@bmatyasb
Copy link
Author

Alternatively, holding down Shift could at least maintain the aspect ratios during resizing. This is a fairly common complaint in our biostatistics classes, unfortunately. :S

@tomtomme
Copy link
Member

tomtomme commented Dec 11, 2024

old duplicates:
#1444
#1674
#2800

and one workaround for the time being by vandenman:

There is no straightforward way to get the R command used to generate the plot (it's possible but it's not easy). However, you can access the plot objects saved in the state the following hacky way:

  • unzip the .jasp file, let's assume it's now called "unzipped_jasp"
  • in R, do load("unzipped_jasp/resources/0/state"). Here 0 is an analysis number, if there are multiple analyses then these all have their own state. So you may need to adjust 0 to something else. There are png files in each folder which should help you find the plot of interest.
  • after load there is now an object called state. You can access the plot objects in there via state$figures$resources/0/_0_t1646864985384.png$obj
    Here resources/0/_0_t1646864985384.png is actually the name of the png file that you want to save differently.
  • Once you've found the plot you're interested in, you can resave it in the usual way:
 pdf(file, width, height)
 print(plot) # assuming the plot object is a ggplot object
 dev.off()

I hope that helps!

@bmatyasb
Copy link
Author

bmatyasb commented Dec 11, 2024 via email

@tomtomme
Copy link
Member

Sure. It is a usefull feature. But I can give no timeline, sorry. So many things to do...
Things like long-wide-conversion and broader missing value handling also were requested ages ago and may have a higher priority atm.

Here is our ToDo list of requests only related to data wrangling and plot editing:
https://github.com/jasp-stats/jasp-issues/issues?page=1&q=is%3Aopen+is%3Aissue+label%3A%22Component%3A+Data+Editing%22%2C%22Component%3A+Plot+Editing%22+sort%3Acreated-asc

@bmatyasb
Copy link
Author

bmatyasb commented Dec 11, 2024 via email

@tomtomme
Copy link
Member

@vandenman is the expert here. Any hints?

@tomtomme
Copy link
Member

tomtomme commented Jan 6, 2025

progress on bmatyasb module to implement tidyplot see here:
#3083

@bmatyasb
As this is essentially now a duplicate, we could close this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Plot Editing Everything related to editing plot in JASP Duplicate This issue or pull request already exists Feature Request Waiting for requester If waiting for a long time it is reasonable to close an issue
Projects
None yet
Development

No branches or pull requests

4 participants