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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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

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
v-nikhilan-msft
Community Support
Community Support

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, @v-nikhilan-msft 

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.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.