Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
tonychung
Regular Visitor

How to setup notebook output width and height in SparkR env?

Hi, 

In PySpark, I can use figsize() to set up figure width and height.

tonychung_0-1718404180514.png

How to setup the image size in SparkR ?

tonychung_1-1718404433987.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tonychung 
Currently there is no other way to achieve this.

However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.

 

Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

 

I hope this information helps. If you have any further queries please do let us know.

Thanks

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @tonychung 
Thanks for using Fabric Community.
In R, options(repr.plot.width) controls the width of a plot's plotting area in inches. The default value is 7 inches. You can use this option to change the size of an R plot. I have provided an example code below:

vnikhilanmsft_0-1718636857357.png

%%sparkr
library(ggplot2)

# Sample data
df <- data.frame(x = rnorm(100), y = rnorm(100))

# Create a ggplot with a specific size
p <- ggplot(df, aes(x, y)) + geom_point()
options(repr.plot.width = 10, repr.plot.height = 10)

p


For more information you can refer to this link:
https://www.rdocumentation.org/packages/repr/versions/0.7/topics/repr-options

Hope this helps. Please let me know if you have any further questions.

Hi, @Anonymous 

The options(repr.plot.width) setting works on RStudio, but does not work on Jupypter notebook in M365 Farbric env.
I tried to use your code and change the value of width & height. But the result is the same.

Anonymous
Not applicable

Hi @tonychung 
Currently there is no other way to achieve this.

However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.

 

Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

 

I hope this information helps. If you have any further queries please do let us know.

Thanks

 

Helpful resources

Announcements
FBCApril_Carousel

Fabric Monthly Update - April 2025

Check out the April 2025 Fabric update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.